]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 640719: Allow creating bookmarkable templates without passing validation,
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 27 Apr 2011 22:02:39 +0000 (15:02 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 27 Apr 2011 22:02:39 +0000 (15:02 -0700)
on enter_bug.cgi
r=pyrzak, a=mkanat

js/field.js
template/en/default/bug/create/create.html.tmpl

index d457cf8118aa45b5973f8ddb8e98b16804da4805..0cbc2ddaf0ed5975eb5fb4b6ac3dc0d956a7568c 100644 (file)
 /* 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;
index 9c27bff24165cf879379d51a0f664ebfe2ca021e..c4d11dc1cebf964bd4781e454d45b73db241f106 100644 (file)
@@ -708,7 +708,7 @@ TUI_hide_default('expert_fields');
       &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>