diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 855fb711a86..a5d93f75202 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7009,8 +7009,8 @@ class Form $retstring = ''; - $hourSelected = 0; - $minSelected = 0; + $hourSelected = ''; + $minSelected = ''; // Hours if ($iSecond != '') { @@ -7024,14 +7024,14 @@ class Form $retstring .= '"; } elseif ($typehour == 'text' || $typehour == 'textselect') { - $retstring .= ''; + $retstring .= ''; } else { return 'BadValueForParameterTypeHour'; } @@ -7046,21 +7046,23 @@ class Form if ($minunderhours) { $retstring .= '
'; } else { - $retstring .= ' '; + if ($typehour != 'text') { + $retstring .= ' '; + } } if ($typehour == 'select' || $typehour == 'textselect') { $retstring .= '"; } elseif ($typehour == 'text') { - $retstring .= ''; + $retstring .= ''; } if ($typehour != 'text') { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 30f2a867af0..57f1a5259cb 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2021 Laurent Destailleur + * Copyright (C) 2006-2023 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2018 Ferran Marcet @@ -1921,20 +1921,20 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser // Duration - Time spent print ''; - $durationtouse_start = 0; + $durationtouse_start = ''; if ($search_timespent_starthour || $search_timespent_startmin) { $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); } - print '
'.$langs->trans('from').' '; - $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text'); + print '
'.$langs->trans('from').' '; + print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); print '
'; - $durationtouse_end = 0; + $durationtouse_end = ''; if ($search_timespent_endhour || $search_timespent_endmin) { $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); } - print '
'.$langs->trans('at').' '; - $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text'); + print '
'.$langs->trans('at').' '; + print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); print '
'; print '';