NEW separate categories filters and add an help

This commit is contained in:
lvessiller 2022-05-06 16:09:26 +02:00
parent e79fffaccf
commit ed23e3f3c3

View File

@ -633,13 +633,15 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($use
}
// Filter on customer categories
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
$moreforfilter .= ' | ';
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->transnoentities('CustomersProspectsCategoriesShort');
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"');
$categoriesProductArr = $form->select_all_categories(Categorie::TYPE_CUSTOMER, '', '', 64, 0, 1);
$categoriesProductArr[-2] = '- '.$langs->trans('NotCategorized').' -';
$moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesProductArr, $searchCategoryCustomerList, 0, 0, 'minwidth300', 0, 0, '', 'category', $tmptitle);
$moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/><label class="none valignmiddle" for="search_category_customer_operator">'.$langs->trans('UseOrOperatorForCategories').'</label>';
$moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>';
$moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip1'); // Tooltip on click
$moreforfilter .= '</div>';
}