Merge pull request #13984 from Supermanu/agenda_date_picker

NEW Add calendar selection for agenda view
This commit is contained in:
Laurent Destailleur
2020-05-28 12:20:37 +02:00
committed by GitHub

View File

@@ -90,6 +90,15 @@ $status = GETPOST("search_status", 'aZ09') ?GETPOST("search_status", 'aZ09') : G
$type = GETPOST("search_type", 'aZ09') ?GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09');
$maxprint = (isset($_GET["maxprint"]) ?GETPOST("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'));
if ($dateselect > 0)
{
$day=GETPOST('dateselectday', 'int');
$month=GETPOST('dateselectmonth', 'int');
$year=GETPOST('dateselectyear', 'int');
}
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
if (GETPOST('search_actioncode', 'array'))
{
@@ -371,6 +380,9 @@ if ($action == 'show_day')
$picto = 'calendarday';
}
$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0);
$nav .= ' <input type="submit" name="submitdateselect" class="button" value="'.$langs->trans("Refresh").'">';
// Must be after the nav definition
$param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : '');
//print 'x'.$param;