diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-13 04:12:06 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-13 04:12:06 +0200 |
commit | 6ff73e25f9867491e58988c142c306089e4f3b66 (patch) | |
tree | da2d737c5d5c15c1697576805b71cddec238f50d /template/en/default/bug | |
parent | f761dd5e9adc2e4dd6c15712b9212ef810def81b (diff) | |
download | bugzilla-6ff73e25f9867491e58988c142c306089e4f3b66.tar.gz bugzilla-6ff73e25f9867491e58988c142c306089e4f3b66.tar.xz |
Bug 490767: Make validation happen with JS, when filing a bug
r=pyrzak, a=mkanat
Diffstat (limited to 'template/en/default/bug')
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 15 |
1 files changed, 9 insertions, 6 deletions
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'); </script> <form name="Create" id="Create" method="post" action="post_bug.cgi" - class="enter_bug_form" enctype="multipart/form-data"> + class="enter_bug_form" enctype="multipart/form-data" + onsubmit="return validateEnterBug(this)"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> @@ -278,7 +284,7 @@ TUI_hide_default('expert_fields'); field = bug_fields.version editable = 1 rowspan = 3 %] <td rowspan="3"> - <select name="version" size="5"> + <select name="version" id="version" size="5"> [%- FOREACH v = version %] <option value="[% v FILTER html %]" [% ' selected="selected"' IF v == default.version %]>[% v FILTER html -%] @@ -695,10 +701,7 @@ TUI_hide_default('expert_fields'); <tr> <th> </th> <td colspan="3"> - <input type="submit" id="commit" value="Submit [% terms.Bug %]" - onclick="if (this.form.short_desc.value == '') - { alert('Please enter a summary sentence for this [% terms.bug %].'); - return false; } return true;"> + <input type="submit" id="commit" value="Submit [% terms.Bug %]"> <input type="submit" name="maketemplate" id="maketemplate" value="Remember values as bookmarkable template" |