From 1a9651149003a53ad269b8fc97d4556b53cebac7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Sep 2016 18:13:13 +0200 Subject: [PATCH] On survey, replace delete image with stanard image in theme. Add warning when expired. --- htdocs/opensurvey/card.php | 6 +++++- htdocs/opensurvey/img/cancel.png | Bin 587 -> 0 bytes htdocs/opensurvey/results.php | 27 +++++++++++++++++---------- 3 files changed, 22 insertions(+), 11 deletions(-) delete mode 100644 htdocs/opensurvey/img/cancel.png diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 26cf85cb3d6..26ee7fe567c 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -313,7 +313,11 @@ print ''; // Expire date print ''.$langs->trans('ExpireDate').''; if ($action == 'edit') print $form->select_date($expiredate?$expiredate:$object->date_fin,'expire',0,0,0,'',1,0,1); -else print dol_print_date($object->date_fin,'day'); +else +{ + print dol_print_date($object->date_fin,'day'); + if ($object->date_fin && $object->date_fin < dol_now()) print img_warning($langs->trans("Expired")); +} print ''; // Author diff --git a/htdocs/opensurvey/img/cancel.png b/htdocs/opensurvey/img/cancel.png deleted file mode 100644 index c149c2bc017d5ce5a8ae9330dd7dbd012482e0f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 587 zcmV-R0<`^!P)FS^-G}e*;M)Q6>s#cP zI`Y#S($G6W`W@NI5g|L-MKl0Zmu$m^(0~^Lwo5OO~d#(vPfztrans("AddADate") .':

'."\n"; print ' '."\n"; - print ''."\n"; + print ''."\n"; for ($i = 0; $i < 24; $i++) { print ''."\n"; } print ''."\n"; print ''."\n"; print '

'. $langs->trans("AddEndHour") .':

'."\n"; print ''."\n"; print ''."\n"; + print ''."\n"; } } @@ -654,10 +654,17 @@ if ($object->format=="D") $next = $toutsujet[$i+1]; } - if (isset($toutsujet[$i+1]) && strftime("%Y",$current) == strftime("%Y",$next)){ + $currenty = 0; + if ($current) $currenty=strftime("%Y",$current); + $next = 0; + if ($next) $nexty=strftime("%Y",$next); + if (isset($toutsujet[$i+1]) && ($currenty == $nexty)) + { $colspan++; } else { - print ''.strftime("%Y", $current).''."\n"; + print ''; + if ($current) print strftime("%Y", $current); + print ''."\n"; $colspan=1; } } @@ -788,7 +795,7 @@ while ($compteur < $num) print ''."\n"; if ($user->rights->opensurvey->write) { - print ''."\n"; + print ''."\n"; } // Name