Debug v18
This commit is contained in:
parent
4068b1db87
commit
ed60d4fe22
@ -7009,8 +7009,8 @@ class Form
|
||||
|
||||
$retstring = '<span class="nowraponall">';
|
||||
|
||||
$hourSelected = 0;
|
||||
$minSelected = 0;
|
||||
$hourSelected = '';
|
||||
$minSelected = '';
|
||||
|
||||
// Hours
|
||||
if ($iSecond != '') {
|
||||
@ -7024,14 +7024,14 @@ class Form
|
||||
$retstring .= '<select class="flat" id="select_'.$prefix.'hour" name="'.$prefix.'hour"'.($disabled ? ' disabled' : '').'>';
|
||||
for ($hour = 0; $hour < 25; $hour++) { // For a duration, we allow 24 hours
|
||||
$retstring .= '<option value="'.$hour.'"';
|
||||
if ($hourSelected == $hour) {
|
||||
if (is_numeric($hourSelected) && $hourSelected == $hour) {
|
||||
$retstring .= " selected";
|
||||
}
|
||||
$retstring .= ">".$hour."</option>";
|
||||
}
|
||||
$retstring .= "</select>";
|
||||
} elseif ($typehour == 'text' || $typehour == 'textselect') {
|
||||
$retstring .= '<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" name="'.$prefix.'hour"'.($disabled ? ' disabled' : '').' class="flat maxwidth50 inputhour" value="'.(($hourSelected != '') ? ((int) $hourSelected) : '').'">';
|
||||
$retstring .= '<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" name="'.$prefix.'hour"'.($disabled ? ' disabled' : '').' class="flat maxwidth50 inputhour right" value="'.(($hourSelected != '') ? ((int) $hourSelected) : '').'">';
|
||||
} else {
|
||||
return 'BadValueForParameterTypeHour';
|
||||
}
|
||||
@ -7046,21 +7046,23 @@ class Form
|
||||
if ($minunderhours) {
|
||||
$retstring .= '<br>';
|
||||
} else {
|
||||
$retstring .= '<span class="hideonsmartphone"> </span>';
|
||||
if ($typehour != 'text') {
|
||||
$retstring .= '<span class="hideonsmartphone"> </span>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($typehour == 'select' || $typehour == 'textselect') {
|
||||
$retstring .= '<select class="flat" id="select_'.$prefix.'min" name="'.$prefix.'min"'.($disabled ? ' disabled' : '').'>';
|
||||
for ($min = 0; $min <= 55; $min = $min + 5) {
|
||||
$retstring .= '<option value="'.$min.'"';
|
||||
if ($minSelected == $min) {
|
||||
if (is_numeric($minSelected) && $minSelected == $min) {
|
||||
$retstring .= ' selected';
|
||||
}
|
||||
$retstring .= '>'.$min.'</option>';
|
||||
}
|
||||
$retstring .= "</select>";
|
||||
} elseif ($typehour == 'text') {
|
||||
$retstring .= '<input placeholder="'.$langs->trans('MinuteShort').'" type="number" min="0" name="'.$prefix.'min"'.($disabled ? ' disabled' : '').' class="flat maxwidth50 inputminute" value="'.(($minSelected != '') ? ((int) $minSelected) : '').'">';
|
||||
$retstring .= '<input placeholder="'.$langs->trans('MinuteShort').'" type="number" min="0" name="'.$prefix.'min"'.($disabled ? ' disabled' : '').' class="flat maxwidth50 inputminute right" value="'.(($minSelected != '') ? ((int) $minSelected) : '').'">';
|
||||
}
|
||||
|
||||
if ($typehour != 'text') {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
@ -1921,20 +1921,20 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
||||
// Duration - Time spent
|
||||
print '<td class="liste_titre right">';
|
||||
|
||||
$durationtouse_start = 0;
|
||||
$durationtouse_start = '';
|
||||
if ($search_timespent_starthour || $search_timespent_startmin) {
|
||||
$durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60);
|
||||
}
|
||||
print '<div class="nowraponall">'.$langs->trans('from').' ';
|
||||
$form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text');
|
||||
print '<div class="nowraponall">'.$langs->trans('from').' ';
|
||||
print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1);
|
||||
print '</div>';
|
||||
|
||||
$durationtouse_end = 0;
|
||||
$durationtouse_end = '';
|
||||
if ($search_timespent_endhour || $search_timespent_endmin) {
|
||||
$durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60);
|
||||
}
|
||||
print '<div class="nowraponall">'.$langs->trans('at').' ';
|
||||
$form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text');
|
||||
print '<div class="nowraponall">'.$langs->trans('at').' ';
|
||||
print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1);
|
||||
print '</div>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user