-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
+% if ($CheckAll or $ClearAll) {
+<script><!--
+function set_checkbox (obj, val) {
+ var i;
+ var myfield = obj.form.getElementsByTagName('input');
+ for (i = 0; i < myfield.length; i++) {
+ if (myfield[i].type == 'checkbox') {
+ myfield[i].checked = val;
+ }
+ }
+}
+--></script>
+% }
<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 >
<TR>
-% if ($Reset) {
<TD>
-<FONT COLOR=#ffd800 >
+% if ($CheckAll) {
+<INPUT TYPE=BUTTON VALUE="<%$CheckAllLabel%>" ONCLICK="set_checkbox(this, true)">
+% }
+% if ($ClearAll) {
+<INPUT TYPE=BUTTON VALUE="<%$ClearAllLabel%>" ONCLICK="set_checkbox(this, false)">
+% }
+% if ($Reset) {
<INPUT TYPE=RESET VALUE="<%$ResetLabel%>">
-</FONT>
-</TD>
%}
+</TD>
<TD>
</TD>
</TABLE>
<%ARGS>
$color => "#336699"
-$Caption => undef
+$Caption => ''
$AlternateCaption => undef
$AlternateLabel => undef
$Label => loc('Submit')
$Name => undef
+$CheckAll => undef
+$CheckAllLabel => loc('Check All')
+$ClearAll => undef
+$ClearAllLabel => loc('Clear All')
$Reset => undef
$ResetLabel => loc('Reset')
</%ARGS>