From 7999cb9a46c31dd85e5782d6cc8566ff136ec39d Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Tue, 21 Mar 2017 23:48:06 +0100 Subject: [PATCH] introducing "mixte" mode for select_duration 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 --- htdocs/core/class/html.form.class.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c5118ec56ef..4202c27f744 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4878,11 +4878,13 @@ class Form * Function to show a form to select a duration on a page * * @param string $prefix Prefix for input fields - * @param int $iSecond Default preselected duration (number of seconds or '') - * @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 integer $minunderhours If 1, show minutes selection under the hours - * @param int $nooutput Do not output html string but return it + * @param int $iSecond Default preselected duration (number of seconds or '') + * @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, + * 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 int $nooutput Do not output html string but return it * @return string|null */ function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) @@ -4902,7 +4904,7 @@ class Form $minSelected = convertSecondToTime($iSecond,'min'); } - if ($typehour=='select') + if ($typehour=='select' ) { $retstring.='"; } - elseif ($typehour=='text') + elseif ($typehour=='text' || $typehour=='mixte') { $retstring.=''; } @@ -4929,7 +4931,7 @@ class Form if ($minunderhours) $retstring.='
'; else $retstring.=" "; - if ($typehour=='select') + if ($typehour=='select' || $typehour=='mixte') { $retstring.='"; } - elseif ($typehour=='text') + elseif ($typehour=='text' ) { $retstring.=''; }