From 6ff73e25f9867491e58988c142c306089e4f3b66 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 12 Jul 2010 19:12:06 -0700 Subject: Bug 490767: Make validation happen with JS, when filing a bug r=pyrzak, a=mkanat --- template/en/default/bug/create/create.html.tmpl | 15 +++++++++------ template/en/default/global/header.html.tmpl | 12 +++++++++++- 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'template') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index d737e8391..fbf415d86 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -160,6 +160,11 @@ function handleWantsAttachment(wants_attachment) { } } +var status_comment_required = new Array(); +[% FOREACH status = bug_status %] + status_comment_required['[% status.name FILTER js %]'] = + [% status.comment_required_on_change_from() ? 'true' : 'false' %] +[% END %] TUI_alternates['expert_fields'] = 'Show Advanced Fields'; // Hide the Advanced Fields by default, unless the user has a cookie @@ -170,7 +175,8 @@ TUI_hide_default('expert_fields');
+ class="enter_bug_form" enctype="multipart/form-data" + onsubmit="return validateEnterBug(this)"> @@ -278,7 +284,7 @@ TUI_hide_default('expert_fields'); field = bug_fields.version editable = 1 rowspan = 3 %] - [%- FOREACH v = version %]