diff options
author | Steve Beaver <sbeaver@netgate.com> | 2018-08-21 07:45:56 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2018-08-21 07:45:56 -0400 |
commit | 4ad34942603aff6c105820d2ef856b8f7398e40b (patch) | |
tree | a1e49d47f15c2aa2b4f97e853bb434cb0b365df7 | |
parent | 1e0016bbac143f5e0d5eace646c3092052b0e064 (diff) | |
download | pfsense-4ad34942603aff6c105820d2ef856b8f7398e40b.zip pfsense-4ad34942603aff6c105820d2ef856b8f7398e40b.tar.gz |
Add "select all" control to remaining NAT pages
-rw-r--r-- | src/usr/local/www/firewall_nat_1to1.php | 9 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_npt.php | 9 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_out.php | 9 | ||||
-rw-r--r-- | src/usr/local/www/firewall_rules.php | 2 |
4 files changed, 25 insertions, 4 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php index 7eb12e3..f5c872b 100644 --- a/src/usr/local/www/firewall_nat_1to1.php +++ b/src/usr/local/www/firewall_nat_1to1.php @@ -145,7 +145,7 @@ display_top_tabs($tab_array); <table class="table table-striped table-hover table-condensed"> <thead> <tr> - <th><!-- checkbox --></th> + <th><input type="checkbox" id="selectAll" name="selectAll" /></th> <th><!-- icon --></th> <th><?=gettext("Interface"); ?></th> <th><?=gettext("External IP"); ?></th> @@ -302,6 +302,13 @@ events.push(function() { return undefined; } }); + + $('#selectAll').click(function() { + var checkedStatus = this.checked; + $('#ruletable tbody tr').find('td:first :checkbox').each(function() { + $(this).prop('checked', checkedStatus); + }); + }); }); //]]> </script> diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php index 7dad0ed..25ff880 100644 --- a/src/usr/local/www/firewall_nat_npt.php +++ b/src/usr/local/www/firewall_nat_npt.php @@ -143,7 +143,7 @@ display_top_tabs($tab_array); <table class="table table-striped table-hover table-condensed"> <thead> <tr> - <th><!-- checkbox --></th> + <th><input type="checkbox" id="selectAll" name="selectAll" /></th> <th><!-- icon --></th> <th><?=gettext("Interface")?></th> <th><?=gettext("External Prefix")?></th> @@ -273,6 +273,13 @@ events.push(function() { return undefined; } }); + + $('#selectAll').click(function() { + var checkedStatus = this.checked; + $('#ruletable tbody tr').find('td:first :checkbox').each(function() { + $(this).prop('checked', checkedStatus); + }); + }); }); //]]> </script> diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index 1944552..458bb8f 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -277,7 +277,7 @@ print($form); <table class="table table-hover table-striped table-condensed"> <thead> <tr> - <th><!-- checkbox --></th> + <th><input type="checkbox" id="selectAll" name="selectAll" /></th> <th><!-- status --></th> <th><?=gettext("Interface")?></th> <th><?=gettext("Source")?></th> @@ -690,6 +690,13 @@ events.push(function() { return undefined; } }); + + $('#selectAll').click(function() { + var checkedStatus = this.checked; + $('#ruletable tbody tr').find('td:first :checkbox').each(function() { + $(this).prop('checked', checkedStatus); + }); + }); }); //]]> </script> diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index 28e4df5..4e71694 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -352,7 +352,7 @@ $columns_in_table = 13; <table id="ruletable" class="table table-hover table-striped table-condensed" style="overflow-x: 'visible'"> <thead> <tr> - <th style="padding-left:10px;"> <input type="checkbox" id="selectAll" name="selectAll" /></th> + <th><input type="checkbox" id="selectAll" name="selectAll" /></th> <th><!-- status icons --></th> <th><?=gettext("States")?></th> <th><?=gettext("Protocol")?></th> |