summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-28 00:01:52 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-04-28 00:01:52 +0200
commit77d29ce6ca5579674b9c9c4c081bf2f10137f35f (patch)
tree24958d3c6e6a179772db9bddfea4f5e74f917d3e
parentab962c79410a30d5695bdb7720cc75478f1c6523 (diff)
downloadbugzilla-77d29ce6ca5579674b9c9c4c081bf2f10137f35f.tar.gz
bugzilla-77d29ce6ca5579674b9c9c4c081bf2f10137f35f.tar.xz
Bug 640719: Allow creating bookmarkable templates without passing validation,
on enter_bug.cgi r=pyrzak, a=mkanat
-rw-r--r--js/field.js8
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
2 files changed, 9 insertions, 1 deletions
diff --git a/js/field.js b/js/field.js
index bd5c3b4c8..949c210a3 100644
--- a/js/field.js
+++ b/js/field.js
@@ -22,7 +22,15 @@
/* This library assumes that the needed YUI libraries have been loaded
already. */
+var bz_no_validate_enter_bug = false;
function validateEnterBug(theform) {
+ // This is for the "bookmarkable templates" button.
+ if (bz_no_validate_enter_bug) {
+ // Set it back to false for people who hit the "back" button
+ bz_no_validate_enter_bug = false;
+ return true;
+ }
+
var component = theform.component;
var short_desc = theform.short_desc;
var version = theform.version;
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 87f86e99f..2f2f18b57 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -711,7 +711,7 @@ TUI_hide_default('attachment_text_field');
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="maketemplate" id="maketemplate"
value="Remember values as bookmarkable template"
- class="expert_fields">
+ onclick="bz_no_validate_enter_bug=true" class="expert_fields">
</td>
</tr>
</tbody>