]> 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:01:52 +0000 (15:01 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Wed, 27 Apr 2011 22:01:52 +0000 (15:01 -0700)
on enter_bug.cgi
r=pyrzak, a=mkanat

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

index bd5c3b4c86f79021b123f77ad87e7b7784c708b2..949c210a30b87be1756d73e629e368b92571f6bc 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 87f86e99f9c395a961ca3b924d4bf008a8f60dc7..2f2f18b57d309dc5f6458925b6503fd49d5a9e42 100644 (file)
@@ -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>