Gossamer Forum
Home : Products : Gossamer Mail : Development, Plugins and Globals :

fix for Users > Delete to allow Check All

Quote Reply
fix for Users > Delete to allow Check All
I patched GMail/SQL/Admin.pm to allow deletion of all entries returned in the search; this behavior mirrors that of GT/SQL/Admin.pm. I needed this so that I could delete all users from a particular domain before removing the domain entry from the system.

Code:
--- Admin.pm.orig 2004-05-13 19:18:09.000000000 -0700
+++ Admin.pm 2004-05-13 19:23:44.000000000 -0700
@@ -252,6 +252,22 @@
</tr>
</table>);
print $speedbar if ($speedbar);
+ print <<END_OF_HTML if $i > 2; # Only print the Check All box if there is more than one thing to check
+<script language="Javascript">
+function CheckAll (box) {
+ for (var i = document.admin.elements.length - 1; i >= 0; i--) {
+ if (document.admin.elements.name != 'delete') { continue }
+ if (box.checked == false) {
+ document.admin.elements.checked = false;
+ }
+ else {
+ document.admin.elements.checked = true;
+ }
+ }
+}
+</script>
+<p><font $FONT><input type=checkbox onClick="CheckAll(this)"> Check All</FONT></p>
+END_OF_HTML
print "<p>", $self->_buttons("Delete");
print $self->_end_form;
print $self->_footer;