From 383654fc0bff10c18890678defcfbc270aea843a Mon Sep 17 00:00:00 2001 From: Vinicius Coque Date: Mon, 19 Apr 2010 15:51:17 -0300 Subject: Block source edit on associated firewall rules --- usr/local/www/firewall_rules_edit.php | 75 +++++++++++----------- .../firewall_rules_edit/firewall_rules_edit.js | 49 +++++++------- 2 files changed, 63 insertions(+), 61 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index e88ac6a..99f9c63 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -672,7 +672,28 @@ include("head.inc"); Source - > + + + NOTE: This is associated to a NAT rule.
+ You cannot edit the source and destination of associated filter rules.
+
+ $nat_rule ) { + if( $nat_rule['associated-rule-id']==$pconfig['associated-rule-id']) { + echo "View the NAT rule
"; + break; + } + } + } + ?> +
+ + + name="srcnot" type="checkbox" id="srcnot" value="yes" > not
Use this option to invert the sense of the match. @@ -682,7 +703,7 @@ include("head.inc"); Type:   - / - - Show source port range + type="button" onClick="show_source_port_range()" value="Advanced"> - Show source port range @@ -734,27 +755,27 @@ include("head.inc"); from:   - - + autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value=""> to: - - + autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value=""> @@ -765,27 +786,7 @@ include("head.inc"); Destination - - - NOTE: This is associated to a NAT rule.
- You cannot edit the destination of associated filter rules.
-
- $nat_rule ) { - if( $nat_rule['assocaited-rule-id']==$pconfig['associated-rule-id']) - echo "View the NAT rule\n"; - break; - } - } - ?> -
- - - - name="dstnot" type="checkbox" id="dstnot" value="yes" > + name="dstnot" type="checkbox" id="dstnot" value="yes" > not
Use this option to invert the sense of the match. @@ -795,7 +796,7 @@ include("head.inc"); Type:   - name="dsttype" class="formselect" onChange="typesel_change()"> + name="dsttype" class="formselect" onChange="typesel_change()"> @@ -825,9 +826,9 @@ include("head.inc"); Address:   - name="dst" type="text" class="formfldalias" id="dst" size="20" value=""> + name="dst" type="text" class="formfldalias" id="dst" size="20" value=""> / - name="dstmask" class="formselect" id="dstmask"> + name="dstmask" class="formselect" id="dstmask"> 0; $i--): ?> @@ -845,27 +846,27 @@ include("head.inc"); from:   - name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()"> + name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()"> $wkportdesc): ?> - autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value=""> to: - name="dstendport" class="formselect" onchange="ext_change()"> + name="dstendport" class="formselect" onchange="ext_change()"> $wkportdesc): ?> - autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value=""> + autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value=""> diff --git a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js index 75bcb62..1b7f33a 100644 --- a/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js +++ b/usr/local/www/javascript/firewall_rules_edit/firewall_rules_edit.js @@ -1,6 +1,6 @@