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 '';
+ if ($empty || $set_time == -1)
+ {
+ print '';
+ }
+
+ // Mois
+ for ($month = 1 ; $month <= 12 ; $month++)
+ {
+ if ($month == $smonth)
+ {
+ print "";
+ }
+ print "";
+
+ // Année
+ if ($empty || $set_time == -1)
+ {
+ print '';
+ }
+ else
+ {
+ print '';
+
+ for ($year = $syear - 3; $year < $syear + 5 ; $year++)
+ {
+ if ($year == $syear)
+ {
+ print "";
+ }
+ print "\n";
+ }
}
-
+
+ /*
+ * Affiche heure en select
+ */
if ($h)
{
print '';
@@ -1511,6 +1533,7 @@ class Form
}
}
+
}
/**