From 3101e5278cf6fa631251f0287f921b0315a27885 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 Jan 2007 20:42:44 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modif=20esth=E9tique=20mineure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/html.form.class.php | 272 +++++++++++++++++++------------------ 1 file changed, 139 insertions(+), 133 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index e17692f2ceb..d4a39e83100 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -2183,8 +2183,9 @@ class Form * \param m 1=Affiche aussi les minutes * \param empty 0=Champ obligatoire, 1=Permet une saisie vide * \param form_name Nom du formulaire de provenance. Utilisé pour les dates en popup style andre. + * \param d 1=Affiche aussi les jours, mois, annees */ - function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0, $form_name="") + function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1) { global $conf,$langs; @@ -2224,140 +2225,145 @@ class Form $smin = ''; } - /* - * Affiche date en popup - */ - if ($conf->use_javascript && $conf->use_popup_calendar) + if ($d) { - //print "e".$set_time." t ".$conf->format_date_short; - if ($set_time > 0) - { - $formated_date=dolibarr_print_date($set_time,$conf->format_date_short); - } - - // Calendrier popup version eldy - if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote - { - // Zone de saisie manuelle de la date - print ' '; - - // Icone calendrier - print ''; - - print ''."\n"; - print ''."\n"; - print ''."\n"; - } - else - { - // Calendrier popup version defaut - if ($langs->defaultlang != "") - { - print ''; + /* + * Affiche date en popup + */ + if ($conf->use_javascript && $conf->use_popup_calendar) + { + //print "e".$set_time." t ".$conf->format_date_short; + if ($set_time > 0) + { + $formated_date=dolibarr_print_date($set_time,$conf->format_date_short); + } + + // Calendrier popup version eldy + if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote + { + // Zone de saisie manuelle de la date + print ' '; + + // Icone calendrier + print ''; + + print ''."\n"; + print ''."\n"; + print ''."\n"; } - print ''; - print ' '; - print ''."\n"; - print ''."\n"; - print ''."\n"; - if($form_name =="") - print ''.img_cal().''; else - print ''.img_cal().''; - } - } - - /* - * Affiche date en select - */ - if (! $conf->use_javascript || ! $conf->use_popup_calendar) - { -/* - if ($set_time == -1) - { - $sday = 0; - $smonth = 0; - $syear = 0; - $shour = 0; - $smin = 0; - } -*/ - // Jour - print '"; - - print '"; - - // Année - if ($empty || $set_time == -1) - { - print ''; - } - else - { - print '\n"; - } - } - - /* - * Affiche heure en select - */ + { + // Calendrier popup version defaut + if ($langs->defaultlang != "") + { + print ''; + } + print ''; + print ' '; + print ''."\n"; + print ''."\n"; + print ''."\n"; + if($form_name =="") + print ''.img_cal().''; + else + print ''.img_cal().''; + } + } + + /* + * Affiche date en select + */ + if (! $conf->use_javascript || ! $conf->use_popup_calendar) + { + /* + if ($set_time == -1) + { + $sday = 0; + $smonth = 0; + $syear = 0; + $shour = 0; + $smin = 0; + } + */ + // Jour + print '"; + + print '"; + + // Année + if ($empty || $set_time == -1) + { + print ''; + } + else + { + print '\n"; + } + } + } + + if ($d && $h) print ' '; + if ($h) { + /* + * Affiche heure en select + */ print ''; if ($empty) print ''; for ($min = 0; $min < 60 ; $min++)