From 0c7d0c0883fd0fd6ab45fe1657074f9a8d99b562 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 17 Oct 2013 17:33:46 +0200 Subject: [PATCH] firewall: Simplify rule action selection. Instead of two clicks, this is now changable with only one click. The color coding should make the decision easier and warn to not make unwanted configurations. --- html/cgi-bin/forwardfw.cgi | 76 ++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 3bd3e0f24..4498076a0 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -1842,31 +1842,67 @@ END END &Header::closebox; + + $checked{"RULE_ACTION"} = (); + foreach ("ACCEPT", "DROP", "REJECT") { + $checked{"RULE_ACTION"}{$_} = ""; + } + + if($fwdfwsettings{'updatefwrule'} eq 'on') { + $checked{"RULE_ACTION"}{$fwdfwsettings{'RULE_ACTION'}} = "checked"; + } elsif ($fwdfwsettings{'POLICY'} eq 'MODE1') { + $checked{"RULE_ACTION"}{"ACCEPT"} = "checked"; + } elsif ($fwdfwsettings{'POLICY'} eq 'MODE2') { + $checked{"RULE_ACTION"}{"DROP"} = "checked"; + } + + print <
+ +
+ + + + + + + + + + + +
+  
  +
+  
  +
+  
  +
+ + + + + +
+
+ +
+END + #---Activate/logging/remark------------------------------------- &Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'}); print< - $Lang::tr{'fwdfw rule action'}"; print"$Lang::tr{'remark'}:"; if($fwdfwsettings{'updatefwrule'} eq 'on' || $fwdfwsettings{'copyfwrule'} eq 'on'){ print "$Lang::tr{'fwdfw rulepos'}: