summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-02 07:04:32 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-02 07:04:32 +0000
commitaaacab2687a4a6e8f18386eff02d3ea32e485250 (patch)
tree3005f9c0550c51803ba58c2a8f7271e79c752114
parent79cd2d63611fb9d179a3ebe2a4d1d6ae8b8e9f4c (diff)
downloadpfsense-aaacab2687a4a6e8f18386eff02d3ea32e485250.zip
pfsense-aaacab2687a4a6e8f18386eff02d3ea32e485250.tar.gz
Add check all and check none buttons
-rw-r--r--usr/local/www/system_groupmanager.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php
index a249d9b..e8a3657 100644
--- a/usr/local/www/system_groupmanager.php
+++ b/usr/local/www/system_groupmanager.php
@@ -241,6 +241,22 @@ if($_GET['act']=="new" || $_GET['act']=="edit"){
}
}
?>
+<script src="/javascript/scriptaculous/prototype.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ function checkall() {
+ var el = document.getElementById('iform');
+ for (var i = 0; i < el.elements.length; i++) {
+ el.elements[i].checked = true;
+ }
+ }
+ function checknone() {
+ var el = document.getElementById('iform');
+ for (var i = 0; i < el.elements.length; i++) {
+ el.elements[i].checked = false;
+ }
+ }
+</script>
<form action="system_groupmanager.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
@@ -274,6 +290,10 @@ if($_GET['act']=="new" || $_GET['act']=="edit"){
marked with an * are strongly recommended for every group.</span>
</td>
</tr>
+ <tr><td colspan="4">
+ <input type="button" name="types[]" value="Check All" onClick="checkall(); return false;">
+ <input type="button" name="types[]" value="Check None" onClick="checknone(); return false;">
+ </td></tr>
<tr>
<td colspan="2">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -287,7 +307,7 @@ if($_GET['act']=="new" || $_GET['act']=="edit"){
$identifier = str_replace('.php','',$fname);
?>
<tr><td class="listlr">
- <input name="<?=$identifier?>" type="checkbox" id="<?=$identifier?>" value="yes" <?php if (in_array($fname,$pconfig['pages'])) echo "checked"; ?>></td>
+ <input class="check" name="<?=$identifier?>" type="checkbox" id="<?=$identifier?>" value="yes" <?php if (in_array($fname,$pconfig['pages'])) echo "checked"; ?>></td>
<td class="listr"><?=$title?></td>
<td class="listr"><?=$fname?></td>
</tr>
@@ -347,4 +367,6 @@ if($_GET['act']=="new" || $_GET['act']=="edit"){
</td>
</tr>
</table>
+
+
<?php include("fend.inc"); ?> \ No newline at end of file
OpenPOWER on IntegriCloud