Forward Firewall: added "apply" button to groupmanagement. Now the user can make...
authorAlexander Marx <amarx@ipfire.org>
Wed, 13 Feb 2013 12:31:55 +0000 (13:31 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:08:19 +0000 (14:08 +0200)
Also added a comment in de.pl and en.pl which should remiond the user to click the button.

html/cgi-bin/forwardfw.cgi
html/cgi-bin/fwhosts.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl

index 3026e00ab6cd53f0ede55e1dd1e1c268dfce66f1..9f89fe7feac9dc3e91e92bcb5466b2ec77a9e326 100755 (executable)
@@ -552,7 +552,7 @@ sub addrule
        print "<table border='0'>";
        print "<tr><td><input type='submit' name='ACTION' value='$Lang::tr{'fwdfw newrule'}'></td>";
        if (-f "${General::swroot}/forward/reread"){
-               print "<td><input type='submit' name='ACTION' value='$Lang::tr{'fwdfw reread'}'></td>";
+               print "<td><input type='submit' name='ACTION' value='$Lang::tr{'fwdfw reread'}'>$Lang::tr{'fwhost reread'}</td>";
        }
                print"</tr></table></form><hr>";        
 
index face57b32c642d9ef840ec7290a59b68602d1138..636cf65e43b02c7878de1bdb9e585c6c03d60639 100755 (executable)
@@ -80,6 +80,11 @@ unless (-e $configsrvgrp) { system("touch $configsrvgrp"); }
 &Header::openbigbox('100%', 'center');
 
 ## ACTION ####
+if ($fwhostsettings{'ACTION'} eq $Lang::tr{'fwdfw reread'})
+{
+       &reread_rules;
+       &showmenu;
+}
 # Update
 if ($fwhostsettings{'ACTION'} eq 'updatenet' )
 {
@@ -1003,9 +1008,15 @@ sub showmenu
        <table border='0' width='100%'><form method='post'>
        <tr><td><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newnet'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newhost'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newgrp'}' /></td>
        <td align='right'><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservice'}' /><input type='submit' name='ACTION' value='$Lang::tr{'fwhost newservicegrp'}' /></td></tr>
-       <tr><td colspan='6'><hr></hr></td></tr></table></form>
+       <tr><td colspan='6'><hr></hr></td>
 END
        
+               
+       if (-f "${General::swroot}/fwhosts/reread"){
+               print "</tr><tr><td colspan='6'><input type='submit' name='ACTION' value='$Lang::tr{'fwdfw reread'}'>$Lang::tr{'fwhost reread'}</td>";
+       }
+               print"</tr></table></form>";    
+
        &Header::closebox();
        
 }
@@ -1876,10 +1887,20 @@ sub getipforgroup
        }
 }
 sub rules
+{
+       if (!-f "${General::swroot}/fwhosts/reread"){
+               system("touch ${General::swroot}/fwhosts/reread");
+       }
+}
+sub reread_rules
 {
        system ("/usr/local/bin/forwardfwctrl");
-       system("rm ${General::swroot}/forward/reread");
+       if ( -f "${General::swroot}/fwhosts/reread"){
+               system("rm ${General::swroot}/fwhosts/reread");
+       }
+       
 }
+
 sub decrease
 {
        my $grp=$_[0];
index d2c1f03838d1c472994ef2ee0933f4829565c0af..141145eae0942ca97e472dd86bebc15aa317bff3 100644 (file)
 'fwhost ovpn_n2n'              => 'OpenVPN N-2-N',
 'fwhost port'                  => 'Port(s)',
 'fwhost prot'                  => 'Protokoll',
+'fwhost reread'                        => 'Die Firewallregeln müssen neu eingelesen werden. Bitte Übernehmen klicken.',
 'fwhost reset'                 => 'Abbrechen',
 'fwhost services'              => 'Dienste',
 'fwhost srv_name'              => 'Dienstname',
index 955d3cfbf6e04fa47956eab997432c37ffa68f8e..1d0c3e7cf43f06b41078a1a618ded3e046d19399 100644 (file)
 'fwhost ovpn_n2n'              => 'OpenVPN N-2-N',
 'fwhost port'                  => 'Port(s)',
 'fwhost prot'                  => 'Protocol',
+'fwhost reread'                        => 'Firewallrules need to be updated. Please click applybutton.',
 'fwhost reset'                 => 'Cancel',
 'fwhost services'              => 'Services',
 'fwhost srv_name'              => 'Servicename',
 'wlan client wpa mode tkip tkip' => 'TKIP-TKIP',
 'wlanap access point' => 'Access Point',
 'wlanap channel' => 'Channel',
-'wlanap country' => 'Country Code',
 'wlanap debugging' => 'Debugging',
 'wlanap del interface' => 'Remove selected interface?',
 'wlanap encryption' => 'Encryption',