From e4557b3dd3b2df98bfa14f7025cb0d9d294ec6a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Sep 2020 23:04:29 +0200 Subject: [PATCH] Responsive --- htdocs/comm/action/card.php | 45 ++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index f51da1cb259..2dbbbd28084 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -904,33 +904,48 @@ if ($action == 'create') // Full day print ''.$langs->trans("EventOnFullDay").''; - // Date start - $datep = ($datep ? $datep : $object->datep); - if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); - print ''.$langs->trans("DateActionStart").''; + $datep = ($datep ? $datep : $object->datep); + if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); + $datef = ($datef ? $datef : $object->datef); + if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); + if (empty($datef) && !empty($datep)) + { + if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) { + $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h'); + } + } + + // Date start + print ''; + print ''.$langs->trans("DateActionStart").''; + print ' - '; + print ''.$langs->trans("DateActionEnd").''; + print ''; if (GETPOST("afaire") == 1) { print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart'); // Empty value not allowed for start date and hours if "todo" } else { print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart'); } - print ''; + print '     -     '; + //print ' - '; + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); + } else { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); + } + print ''; // Date end - $datef = ($datef ? $datef : $object->datef); - if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); - if (empty($datef) && !empty($datep)) - { - if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) { - $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h'); - } - } - print ''.$langs->trans("DateActionEnd").''; + /*print ''; + print ''.$langs->trans("DateActionEnd").''; + print ''; + print ''; if (GETPOST("afaire") == 1) { print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); } else { print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); } - print ''; + print '';*/ // Dev in progress $userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0);