Firewall: Language changes, JQuery code cleanup

This commit is contained in:
Alexander Marx
2013-10-17 14:27:41 +02:00
parent 8777989d46
commit c9493d6c4f
4 changed files with 5 additions and 19 deletions

View File

@@ -1729,9 +1729,9 @@ END
</div>
<div id="PROTOCOL_ICMP_TYPES">
<table width='30%' border='0' style="float:left;">
<table width='50%' border='0' style="float:left;">
<tr>
<td>$Lang::tr{'fwhost icmptype'}</td>
<td width='20%'>$Lang::tr{'fwhost icmptype'}</td>
<td colspan='2'>
<select name='ICMP_TYPES' style='min-width:230px;'>
END

View File

@@ -98,29 +98,15 @@ print<<END;
// Check if we are dealing with a protocol, that knows ports.
if (\$.inArray(protocol, PROTOCOLS_WITH_PORTS) >= 0) {
\$("#PORT").show();
\$("#PROTOKOLL").hide();
} else {
\$("#PORT").hide();
}
// Handle ICMP.
if (protocol === "ICMP") {
\$("#PROTOKOLL").show();
} else {
\$("#PROTOKOLL").hide();
}
};
\$(document).ready(function() {
var protocol = \$("#protocol").val();
// Handle ICMP.
if (protocol === "ICMP") {
\$("#PROTOKOLL").show();
\$("#PORT").hide();
} else {
\$("#PROTOKOLL").hide();
\$("#PORT").show();
}
\$("#protocol").change(update_protocol);
update_protocol();
});