diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 59c842dff71..7226b06e287 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1345,12 +1345,9 @@ class Form */ function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0) { - global $langs; + global $conf,$langs; - if (! $set_time && $empty == 0) - { - $set_time = time(); - } + if (! $set_time && $empty == 0) $set_time = time(); $strmonth[1] = $langs->trans("January"); $strmonth[2] = $langs->trans("February"); @@ -1390,81 +1387,106 @@ class Form $shour = ''; $smin = ''; } - - // Jour - print ' '; + print ''."\n"; + print ''."\n"; + print ''."\n"; } - - for ($day = 1 ; $day <= 31; $day++) + + /* + * Affiche date en select + */ + if (! $conf->use_javascript || ! $conf->use_popup_date) { - if ($day == $sday) + + // Jour + print '"; - - print '"; - - // Année - if ($empty || $set_time == -1) - { - print ''; - } - else - { - print '\n"; + + print ""; + + print '"; + + // Année + if ($empty || $set_time == -1) + { + print ''; + } + else + { + print '\n"; + } } - + + /* + * Affiche heure en select + */ if ($h) { print '