]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/outgoingfw.cgi
Fixed a bug in the outgoingfw where preselected groups where not
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / outgoingfw.cgi
index 27a8927e6c1258f4209339900977d8db59c832f2..295bde477c4a9069fe986116642bf0d94e0a39c9 100644 (file)
@@ -408,8 +408,12 @@ END
                                if ($outfwsettings{'STATE'} eq 'DENY'){ $outfwsettings{'DISPLAY_STATE'} = "<img src='/images/stock_stop.png' alt='DENY' />"; }
                                if ($outfwsettings{'STATE'} eq 'ALLOW'){ $outfwsettings{'DISPLAY_STATE'} = "<img src='/images/stock_ok.png' alt='ALLOW' />"; }
                                if ((($outfwsettings{'POLICY'} eq 'MODE1') && ($outfwsettings{'STATE'} eq 'ALLOW')) || (($outfwsettings{'POLICY'} eq 'MODE2') && ($outfwsettings{'STATE'} eq 'DENY'))){
-                                       print <<END
-                                       <tr bgcolor='$color{'color20'}'>
+                               if ( $outfwsettings{'ENABLED'} eq "on" ){
+                                       print "<tr bgcolor='$color{'color20'}'>";
+                               } else {
+                                       print "<tr bgcolor='$color{'color18'}'>";
+                               }
+                                       print <<END
                                            <td align='center'>$outfwsettings{'PROT'}
                                            <td align='center'>$outfwsettings{'SNET'}
                                            <td align='center'>$outfwsettings{'DISPLAY_DIP'}:$outfwsettings{'DISPLAY_DPORT'}
@@ -695,7 +699,8 @@ END
 ;
        my @ipgroups = qx(ls $configpath/ipgroups/);
        foreach (sort @ipgroups){
-               print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
+               chomp($_);
+               print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{$_}>$_</option>\n";
        }
        print <<END
                                        </optgroup>
@@ -704,7 +709,8 @@ END
 ;
        my @macgroups = qx(ls $configpath/macgroups/);
        foreach (sort @macgroups){
-               print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{'$_'}>$_</option>\n";
+               chomp($_);
+               print "\t\t\t\t\t<option value='$_' $selected{'SNET'}{$_}>$_</option>\n";
        }
        print <<END
                                        </optgroup>
@@ -840,4 +846,4 @@ END
 }
 
 &Header::closebigbox();
-&Header::closepage();
\ No newline at end of file
+&Header::closepage();