diff --git a/htdocs/add_value_form.php b/htdocs/add_value_form.php index 2815c51..33e39bd 100644 --- a/htdocs/add_value_form.php +++ b/htdocs/add_value_form.php @@ -160,6 +160,7 @@ if (get_request('meth','REQUEST') != 'ajax') { echo ''; $request['page']->draw('Template',$attribute); + $request['page']->draw('Javascript',$attribute); echo '
'; } else { diff --git a/lib/TemplateRender.php b/lib/TemplateRender.php index db20ba4..1f1a276 100644 --- a/lib/TemplateRender.php +++ b/lib/TemplateRender.php @@ -1598,23 +1598,15 @@ function validateForm(silence) { $this->drawTemplateJavascript(); - # If we have a DateAttribute, we need to set some defaults for the js_calendar. - if (isset($_SESSION[APPCONFIG])) { - foreach ($this->template->getAttributesShown() as $attribute) { - if (array_key_exists($attribute->getName(),array_change_key_case($_SESSION[APPCONFIG]->getValue('appearance','date_attrs')))) { - echo ''."\n"; - echo ''."\n"; - echo ''."\n"; - echo "\n"; - - break; - } - } - } + # For DateAttributes, we need to set some defaults for the js_calendar. + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo "\n"; foreach ($this->template->getAttributesShown() as $attribute) $this->draw('Javascript',$attribute);