Fix input of duration
This commit is contained in:
parent
fbb3406c5d
commit
1a1b27d68c
@ -4962,7 +4962,7 @@ class Form
|
|||||||
}
|
}
|
||||||
elseif ($typehour=='text' || $typehour=='textselect')
|
elseif ($typehour=='text' || $typehour=='textselect')
|
||||||
{
|
{
|
||||||
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat maxwidth50" value="'.($hourSelected?((int) $hourSelected):'').'">';
|
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat maxwidth50" value="'.(($hourSelected != '')?((int) $hourSelected):'').'">';
|
||||||
}
|
}
|
||||||
else return 'BadValueForParameterTypeHour';
|
else return 'BadValueForParameterTypeHour';
|
||||||
|
|
||||||
@ -4986,7 +4986,7 @@ class Form
|
|||||||
}
|
}
|
||||||
elseif ($typehour=='text' )
|
elseif ($typehour=='text' )
|
||||||
{
|
{
|
||||||
$retstring.='<input placeholder="'.$langs->trans('MinuteShort').'" type="number" min="0" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat maxwidth50" value="'.($minSelected?((int) $minSelected):'').'">';
|
$retstring.='<input placeholder="'.$langs->trans('MinuteShort').'" type="number" min="0" size="1" name="'.$prefix.'min"'.($disabled?' disabled':'').' class="flat maxwidth50" value="'.(($minSelected != '')?((int) $minSelected):'').'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($typehour!='text') $retstring.=' '.$langs->trans('MinuteShort');
|
if ($typehour!='text') $retstring.=' '.$langs->trans('MinuteShort');
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $action=GETPOST('action','alpha');
|
|||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$withproject=GETPOST('withproject','int');
|
$withproject=GETPOST('withproject','int');
|
||||||
$project_ref=GETPOST('project_ref','alpha');
|
$project_ref=GETPOST('project_ref','alpha');
|
||||||
$planned_workload=((GETPOST('planned_workloadhour')!='' && GETPOST('planned_workloadmin')!='')?GETPOST('planned_workloadhour')*3600+GETPOST('planned_workloadmin')*60:'');
|
$planned_workload=((GETPOST('planned_workloadhour','int')!='' || GETPOST('planned_workloadmin','int')!='') ? (GETPOST('planned_workloadhour','int')>0?GETPOST('planned_workloadhour','int')*3600:0) + (GETPOST('planned_workloadmin','int')>0?GETPOST('planned_workloadmin','int')*60:0) : '');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user