From: Max Kanat-Alexander Date: Wed, 27 Apr 2011 22:02:39 +0000 (-0700) Subject: Bug 640719: Allow creating bookmarkable templates without passing validation, X-Git-Tag: bugzilla-4.0.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6eb939d52cd2452fb4a6ec4d13efc2992bf51f21;p=thirdparty%2Fbugzilla.git Bug 640719: Allow creating bookmarkable templates without passing validation, on enter_bug.cgi r=pyrzak, a=mkanat --- diff --git a/js/field.js b/js/field.js index d457cf8118..0cbc2ddaf0 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 9c27bff241..c4d11dc1ce 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -708,7 +708,7 @@ TUI_hide_default('expert_fields');      + onclick="bz_no_validate_enter_bug=true" class="expert_fields">