Kaynağa Gözat

JIRA: 372/2, back button in booking_agenda fixes

szollosil 1 yıl önce
ebeveyn
işleme
9c43451457

+ 7 - 1
core/tpl/extrafields_list_search_sql.tpl.php

@@ -1,6 +1,9 @@
 <?php
 
 // Protection to avoid direct call of template
+
+use function PHPSTORM_META\type;
+
 if (empty($conf) || !is_object($conf)) {
 	print "Error, template page can't be called as URL";
 	exit;
@@ -57,11 +60,14 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
 				$mode_search = 2; // Search on a foreign key int
 			}
 			if (in_array($typ, array('sellist')) && !is_numeric($crit)) {
-				$mode_search = 0;// Search on a foreign key string
+				$mode_search = 0; // Search on a foreign key string
 			}
 			if (in_array($typ, array('chkbxlst', 'checkbox', 'select'))) {
 				$mode_search = 4; // Search on a multiselect field with sql type = text
 			}
+			if($key == 'search_options_assigned_device'){
+				$mode_search = 3;
+			}
 			if (is_array($crit)) {
 				$crit = implode(' ', $crit); // natural_search() expects a string
 				if ($key == 'search_options_to_email') {

+ 2 - 2
custom/booking/booking_agenda.php

@@ -117,7 +117,7 @@ $status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'aZ09') : GET
 $type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
 $maxprint = GETPOSTISSET("maxprint") ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW;
 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
-
+$idmenu = GETPOST('idmenu', 'int');
 $dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'));
 if ($dateselect > 0) {
     $day = GETPOST('dateselectday', 'int');
@@ -429,7 +429,7 @@ if ($mode == 'show_day') {
     $nav = "<a href=\"?year=" . $prev_year . "&month=" . $prev_month . "&day=" . $prev_day . $param . "\"><i class=\"fa fa-chevron-left\"></i></a> &nbsp;\n";
     $nav .= " <span id=\"month_name\">" . dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort");
     $nav .= " </span>\n";
-    $nav .= " &nbsp; <a href=\"?year=" . $next_year . "&month=" . $next_month . "&day=" . $next_day . $param . "\"><i class=\"fa fa-chevron-right\"></i></a>\n";
+    $nav .= " &nbsp; <a href=\"?year=" . $next_year . "&month=" . $next_month . "&day=" . $next_day . $param . "&idmenu=" . $idmenu . "&mainmenu=booking&leftmenu=\"><i class=\"fa fa-chevron-right\"></i></a>\n";
     if (empty($conf->dol_optimize_smallscreen)) {
         $nav .= " &nbsp; <a href=\"?year=" . $nowyear . "&amp;month=" . $nowmonth . "&amp;day=" . $nowday . $param . "\">" . $langs->trans("Today") . "</a> ";
     }