]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 186689: Should be able to set all/clear all email options in user preferences...
authorjustdave%syndicomm.com <>
Sun, 23 Feb 2003 04:26:51 +0000 (04:26 +0000)
committerjustdave%syndicomm.com <>
Sun, 23 Feb 2003 04:26:51 +0000 (04:26 +0000)
r= gerv, a= justdave

template/en/default/account/prefs/email.html.tmpl
template/en/default/account/prefs/prefs.html.tmpl

index 5d73a357b6d4fb0e8c1461ee26fef2d85ec7137b..8bbb62dfc2b72b83fb417d382f14e322e4a9ab7b 100644 (file)
     </td>
   </tr>
 </table>
+<noscript>If you had Javascript active, you could toggle all of these with one click.<br></noscript>
+<script type="text/javascript">
+<!--
+function SetCheckboxes(setting) {
+  for (var count = 0; count < document.userprefsform.elements.length; count++) {
+    var theinput = document.userprefsform.elements[count];
+    if (theinput.type == "checkbox") {
+      if (theinput.name == "ExcludeSelf") {
+        theinput.checked = false;
+      }
+      else {
+        theinput.checked = setting;
+      }
+    }
+  }
+}
 
+document.write('<input type="button" value="Enable All Mail" onclick="SetCheckboxes(true); return false;">\n');
+document.write('<input type="button" value="Disable All Mail" onclick="SetCheckboxes(false); return false;">\n');
+// -->
+</script>
 <hr>
 <b>Field/recipient specific options:</b>
 <br>
index d822d31ca6f824f5780c78459dddd9ef7c5924bf..9d2b08051c4646efd92d613e6aaf0bcf59dbec71 100644 (file)
@@ -98,7 +98,7 @@
 
 <h3>[% current_tab.description %]</h3>
 
-<form method="post" action="userprefs.cgi">
+<form name="userprefsform" method="post" action="userprefs.cgi">
   <input type="hidden" name="tab" value="[% current_tab.name %]">
 
   [%# See bug 160710 for why this is done this way %]