diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2013-09-16 20:46:33 +0200 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2013-09-16 20:46:33 +0200 |
commit | 6ae8c4f281e9931fa9650e841453082ffd086ec4 (patch) | |
tree | 7f656104fa81e81dd18c8325602d8773254486d6 /usr/local/www/firewall_nat_out.php | |
parent | 67e5e3c6dbf7aa05a4b4fbaa2ebcee8328aa5648 (diff) | |
download | pfsense-6ae8c4f281e9931fa9650e841453082ffd086ec4.zip pfsense-6ae8c4f281e9931fa9650e841453082ffd086ec4.tar.gz |
outboundnat, disable checkbox
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 5d40aa5..191ba1a 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -249,6 +249,17 @@ if (isset($_POST['del_x'])) { exit; } +} else if ($_GET['act'] == "toggle") { + if ($a_out[$_GET['id']]) { + if(isset($a_out[$_GET['id']]['disabled'])) + unset($a_out[$_GET['id']]['disabled']); + else + $a_out[$_GET['id']]['disabled'] = true; + if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) + mark_subsystem_dirty('natconf'); + header("Location: firewall_nat_out.php"); + exit; + } } else { /* yuck - IE won't send value attributes for image buttons, while Mozilla does - so we use .x/.y to find move button clicks instead... */ unset($movebtn); @@ -376,7 +387,19 @@ include("head.inc"); <?php $nnats = $i = 0; foreach ($a_out as $natent): ?> <tr valign="top" id="fr<?=$nnats;?>"> <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onclick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" /></td> - <td class="listt" align="center"></td> + <td class="listt" align="center"> + <?php + $iconfn = "pass"; + if (isset($natent['disabled'])) { + $textss = "<span class=\"gray\">"; + $textse = "</span>"; + $iconfn .= "_d"; + } else { + $textss = $textse = ""; + } + ?> + <a href="?act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>" alt="icon" /></a> + </td> <td class="listlr" onclick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='firewall_nat_out_edit.php?id=<?=$nnats;?>';"> <?php echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?> |