Firewall: fix rules.pl when using custom hosts/networks and services no rule was applied because no protokoll could be found

Also extended JS code to correctly show ICMP Types only, if NO Targetport is selcted
This commit is contained in:
Alexander Marx
2013-10-09 10:31:35 +02:00
parent 433b7aa8e9
commit 3af3ecd319
2 changed files with 13 additions and 2 deletions

View File

@@ -123,6 +123,14 @@ function toggle_elements( id ) {
else{
document.getElementById(id).style.display='none';
}
if(document.getElementById('targetport').style.display== "none" && document.getElementById('PROT').value === 'ICMP' )
{
document.getElementById('PROTOKOLL').style.display='block';
}
if(document.getElementById('targetport').style.display== "block" && document.getElementById('PROT').value === 'ICMP' )
{
document.getElementById('PROTOKOLL').style.display='none';
}
return true;
}
function hide_elements()
@@ -1755,6 +1763,9 @@ END
if ($fwdfwsettings{'USESRV'} ne 'ON'){
print"<script language='JavaScript'>hide_elements('targetport');</script>";
}
if ($fwdfwsettings{'USESRV'} eq 'ON' && $fwdfwsettings{'PROT'} eq 'ICMP'){
print"<script language='JavaScript'>hide_elements('PROTOKOLL');</script>";
}
&Header::closebox;
#---Activate/logging/remark-------------------------------------
&Header::openbox('100%', 'left', $Lang::tr{'fwdfw additional'});