Merge pull request #23594 from BB2A/FIX---Filter-checkbox-change-ranking
FIX - Filter checkbox memory to reload page on list order det
This commit is contained in:
commit
2890971264
@ -793,6 +793,15 @@ if ($resql) {
|
|||||||
if ($search_fk_input_reason > 0) {
|
if ($search_fk_input_reason > 0) {
|
||||||
$param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
|
$param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
|
||||||
}
|
}
|
||||||
|
if (!empty($productobuy)) {
|
||||||
|
$param .= '&productobuy='.urlencode($productobuy);
|
||||||
|
}
|
||||||
|
if (!empty($productonly)) {
|
||||||
|
$param .= '&productonly='.urlencode($productonly);
|
||||||
|
}
|
||||||
|
if (!empty($disablelinefree)) {
|
||||||
|
$param .= '&disablelinefree='.urlencode($disablelinefree);
|
||||||
|
}
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
@ -830,10 +839,6 @@ if ($resql) {
|
|||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'order', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'order', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
print '<input type="checkbox" name="productobuy"'.(!empty($productobuy)?'value="productobuychecked" checked':'' ).'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
|
|
||||||
print '<input type="checkbox" name="productonly"'.(!empty($productonly)?'value="productonlychecked" checked':'' ).'><label for="productonly">'.$langs->trans("productonly").'</label>';
|
|
||||||
print '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree)?'value="disablelinefreechecked" checked':'' ).'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
|
|
||||||
|
|
||||||
$topicmail = "SendOrderRef";
|
$topicmail = "SendOrderRef";
|
||||||
$modelmail = "order_send";
|
$modelmail = "order_send";
|
||||||
$objecttmp = new Commande($db);
|
$objecttmp = new Commande($db);
|
||||||
@ -849,6 +854,11 @@ if ($resql) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
|
$moreforfilter .= '<input type="checkbox" name="productobuy"'.(!empty($productobuy)?'value="productobuychecked" checked':'' ).'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
|
||||||
|
$moreforfilter .= '<input type="checkbox" name="productonly"'.(!empty($productonly)?'value="productonlychecked" checked':'' ).'><label for="productonly">'.$langs->trans("productonly").'</label>';
|
||||||
|
$moreforfilter .= '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree)?'value="disablelinefreechecked" checked':'' ).'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
|
||||||
|
$moreforfilter .= '<br>';
|
||||||
|
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects other than his'
|
||||||
if ($user->rights->user->user->lire) {
|
if ($user->rights->user->user->lire) {
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
@ -888,6 +898,8 @@ if ($resql) {
|
|||||||
$moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle, 0, 0, array(), 'maxwidth250 widthcentpercentminusx');
|
$moreforfilter .= img_picto($tmptitle, 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($search_warehouse, 'search_warehouse', '', 1, 0, 0, $tmptitle, 0, 0, array(), 'maxwidth250 widthcentpercentminusx');
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user