From: Alexander Marx Date: Fri, 15 Feb 2013 05:21:00 +0000 (+0100) Subject: Forward Firewall: Changed "apply" button to be more eye-catching (red font) X-Git-Tag: v2.15-beta1~290^2~11^2~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2cee24627a50955ee1ab6b1414ce9d5aa7feeb2c;p=people%2Fms%2Fipfire-2.x.git Forward Firewall: Changed "apply" button to be more eye-catching (red font) also some minor bugfixes (The last entry in a used group can not be deleted) --- diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 9f89fe7fea..2e783ce46d 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -552,7 +552,7 @@ sub addrule print ""; print ""; if (-f "${General::swroot}/forward/reread"){ - print ""; + print ""; } print"
$Lang::tr{'fwhost reread'}$Lang::tr{'fwhost reread'}

"; diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index c45b0de587..c1229b3636 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1055,7 +1055,7 @@ END if (-f "${General::swroot}/fwhosts/reread"){ - print "$Lang::tr{'fwhost reread'}"; + print "$Lang::tr{'fwhost reread'}"; } print""; @@ -1437,6 +1437,7 @@ sub viewtablegrp my $grpname; my $remark; my $number; + my $delflag; if (!keys %customgrp) { print "
$Lang::tr{'fwhost empty'}"; @@ -1444,6 +1445,17 @@ sub viewtablegrp foreach my $key (sort { uc($customgrp{$a}[0]) cmp uc($customgrp{$b}[0]) } sort { uc($customgrp{$a}[2]) cmp uc($customgrp{$b}[2]) } keys %customgrp){ $count++; if ($helper ne $customgrp{$key}[0]){ + $delflag='0'; + foreach my $key1 (sort { uc($customgrp{$a}[0]) cmp uc($customgrp{$b}[0]) } sort { uc($customgrp{$a}[2]) cmp uc($customgrp{$b}[2]) } keys %customgrp){ + if ($customgrp{$key}[0] eq $customgrp{$key1}[0]) + { + $delflag++; + } + #if($delflag > 0){ + #last; + #} + + } $number=1; if ($customgrp{$key}[2] eq "none"){$customgrp{$key}[2]=$Lang::tr{'fwhost empty'};} $grpname=$customgrp{$key}[0]; @@ -1459,6 +1471,7 @@ sub viewtablegrp print"
"; print""; } + if ( ($fwhostsettings{'ACTION'} eq 'editgrp' || $fwhostsettings{'update'} ne '') && $fwhostsettings{'grp_name'} eq $customgrp{$key}[0]) { print" "; }elsif ($count %2 == 0){ @@ -1479,7 +1492,7 @@ sub viewtablegrp }else{ print"";
Name$Lang::tr{'ip address'}$Lang::tr{'fwhost type'}
$ip$customgrp{$key}[3]
"; } - if ($number > 1 && $ip ne ''){ + if ($delflag > '1' && $ip ne ''){ print""; } print"