From: Alexander Marx Date: Tue, 18 Mar 2014 14:02:55 +0000 (+0100) Subject: Firewall: extend DNAT dropdown with auto,BLUE,ORANGE,GREEN X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=1aa5439cf14c881043dddf685a528fabf33305af Firewall: extend DNAT dropdown with auto,BLUE,ORANGE,GREEN --- diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index 82684e06f..582950b67 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1632,25 +1632,28 @@ END END - if (%aliases) { - print <$Lang::tr{'dnat address'}: "; - } else { - print < - - -END } + #DNAT Dropdown + foreach my $network (sort keys %defaultNetworks) + { + if ($defaultNetworks{$network}{'NAME'} eq 'BLUE'||$defaultNetworks{$network}{'NAME'} eq 'GREEN' ||$defaultNetworks{$network}{'NAME'} eq 'ORANGE'){ + print ""; + } + } + print ""; print ""; #SNAT @@ -1671,19 +1674,14 @@ END foreach my $alias (sort keys %aliases) { print ""; } - - # XXX this is composed in a very ugly fashion + # SNAT Dropdown foreach my $network (sort keys %defaultNetworks) { - next if($defaultNetworks{$network}{'NAME'} eq "IPFire"); - next if($defaultNetworks{$network}{'NAME'} eq "ALL"); - next if($defaultNetworks{$network}{'NAME'} =~ /OpenVPN/i); - next if($defaultNetworks{$network}{'NAME'} =~ /IPsec/i); - - print ""; + if ($defaultNetworks{$network}{'NAME'} eq 'BLUE'||$defaultNetworks{$network}{'NAME'} eq 'GREEN' ||$defaultNetworks{$network}{'NAME'} eq 'ORANGE'){ + print ""; + } } - print <