Commit 83633231 authored by Chris Graham's avatar Chris Graham

Fixed issues with date submission using HTML5

parent 22e06931
......@@ -321,7 +321,7 @@ class Module_cms_blogs extends Standard_crud_module
}
if ((addon_installed('calendar')) && (has_privilege(get_member(), 'scheduled_publication_times'))) {
$fields2->attach(form_input_date__scheduler(do_lang_tempcode('PUBLICATION_TIME'), do_lang_tempcode('DESCRIPTION_PUBLICATION_TIME'), 'schedule', false, true, true, $scheduled, intval(date('Y')) - 1970 + 2, 1970));
$fields2->attach(form_input_date__scheduler(do_lang_tempcode('PUBLICATION_TIME'), do_lang_tempcode('DESCRIPTION_PUBLICATION_TIME'), 'schedule', false, ($scheduled === null), true, $scheduled, intval(date('Y')) - 1970 + 2, 1970));
}
require_code('feedback2');
......
......@@ -410,7 +410,7 @@ class Module_cms_news extends Standard_crud_module
$fields2->attach(form_input_upload_multi_source(do_lang_tempcode('REPRESENTATIVE_IMAGE'), do_lang_tempcode('DESCRIPTION_NEWS_IMAGE_OVERRIDE'), $hidden, 'image', 'newscats', false, $image));
if ((addon_installed('calendar')) && (has_privilege(get_member(), 'scheduled_publication_times'))) {
$fields2->attach(form_input_date__scheduler(do_lang_tempcode('PUBLICATION_TIME'), do_lang_tempcode('DESCRIPTION_PUBLICATION_TIME'), 'schedule', false, true, true, $scheduled, intval(date('Y')) - 1970 + 2, 1970));
$fields2->attach(form_input_date__scheduler(do_lang_tempcode('PUBLICATION_TIME'), do_lang_tempcode('DESCRIPTION_PUBLICATION_TIME'), 'schedule', false, ($scheduled === null), true, $scheduled, intval(date('Y')) - 1970 + 2, 1970));
}
require_code('activities');
......
......@@ -613,7 +613,12 @@ function check_form(the_form,for_preview)
}
}
if (erroneous)
if (!the_form.checkValidity())
{
erroneous=true;
}
if (erroneous && error_element!==null)
{
if (!alerted) window.fauxmodal_alert('{!IMPROPERLY_FILLED_IN;^}');
var posy=find_pos_y(error_element,true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment