From f8c3396fa761e23fd0dc9f74ac8a5eb2b44bcf24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Apr 2013 14:45:23 +0200 Subject: [PATCH] Fix: "Now" button was not working when using combo calendar selector. --- htdocs/core/class/html.form.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7911ba18a80..d342507a8f3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3319,12 +3319,12 @@ class Form $smin = ''; } + $usecalendar='combo'; + if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) $usecalendar=empty($conf->global->MAIN_POPUP_CALENDAR)?'eldy':$conf->global->MAIN_POPUP_CALENDAR; + if ($conf->browser->phone) $usecalendar='combo'; + if ($d) { - $usecalendar='combo'; - if (! empty($conf->use_javascript_ajax) && (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR != "none")) $usecalendar=empty($conf->global->MAIN_POPUP_CALENDAR)?'eldy':$conf->global->MAIN_POPUP_CALENDAR; - if ($conf->browser->phone) $usecalendar='combo'; - // Show date with popup if ($usecalendar != 'combo') { @@ -3450,7 +3450,7 @@ class Form $reset_scripts = ""; // Generate the date part, depending on the use or not of the javascript calendar - if (empty($conf->global->MAIN_POPUP_CALENDAR) || $conf->global->MAIN_POPUP_CALENDAR == "eldy") + if ($usecalendar == "eldy") { $base=DOL_URL_ROOT.'/core/'; $reset_scripts .= 'resetDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJava").'\',\''.$langs->defaultlang.'\');';