Merge pull request #6552 from defrance/patch-91
NEW : introducing "mixte" mode for select_duration
This commit is contained in:
commit
d1c29bf698
@ -4880,7 +4880,9 @@ class Form
|
|||||||
* @param string $prefix Prefix for input fields
|
* @param string $prefix Prefix for input fields
|
||||||
* @param int $iSecond Default preselected duration (number of seconds or '')
|
* @param int $iSecond Default preselected duration (number of seconds or '')
|
||||||
* @param int $disabled Disable the combo box
|
* @param int $disabled Disable the combo box
|
||||||
* @param string $typehour If 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a text
|
* @param string $typehour If 'select' then input hour and input min is a combo,
|
||||||
|
* if 'text' input hour is in text and input min is a text,
|
||||||
|
* if 'mixte' input hour is in text and input min is a combo
|
||||||
* @param integer $minunderhours If 1, show minutes selection under the hours
|
* @param integer $minunderhours If 1, show minutes selection under the hours
|
||||||
* @param int $nooutput Do not output html string but return it
|
* @param int $nooutput Do not output html string but return it
|
||||||
* @return string|null
|
* @return string|null
|
||||||
@ -4916,7 +4918,7 @@ class Form
|
|||||||
}
|
}
|
||||||
$retstring.="</select>";
|
$retstring.="</select>";
|
||||||
}
|
}
|
||||||
elseif ($typehour=='text')
|
elseif ($typehour=='text' || $typehour=='mixte')
|
||||||
{
|
{
|
||||||
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
|
$retstring.='<input placeholder="'.$langs->trans('HourShort').'" type="number" min="0" size="1" name="'.$prefix.'hour"'.($disabled?' disabled':'').' class="flat" value="'.($hourSelected?((int) $hourSelected):'').'">';
|
||||||
}
|
}
|
||||||
@ -4929,7 +4931,7 @@ class Form
|
|||||||
if ($minunderhours) $retstring.='<br>';
|
if ($minunderhours) $retstring.='<br>';
|
||||||
else $retstring.=" ";
|
else $retstring.=" ";
|
||||||
|
|
||||||
if ($typehour=='select')
|
if ($typehour=='select' || $typehour=='mixte')
|
||||||
{
|
{
|
||||||
$retstring.='<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled':'').'>';
|
$retstring.='<select class="flat" name="'.$prefix.'min"'.($disabled?' disabled':'').'>';
|
||||||
for ($min = 0; $min <= 55; $min=$min+5)
|
for ($min = 0; $min <= 55; $min=$min+5)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user