mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
Firewall: Language changes, JQuery code cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user