Firewall: Hide rule actions when using NAT.

There is no need to choose a rule action when creating a NAT rule, so this
section can be hidden when "Use NAT" has been checked.
This commit is contained in:
Stefan Schantl
2014-01-14 22:09:13 +01:00
parent 5a906c11ec
commit bfaa69562a

View File

@@ -136,14 +136,17 @@ print<<END;
\$("#protocol").change(update_protocol);
update_protocol();
// When nat not used, hide it
if (! \$("#USE_NAT").attr("checked")) {
// Show/Hide elements when NAT checkbox is checked.
if (\$("#USE_NAT").attr("checked")) {
\$("#actions").hide();
} else {
\$(".NAT").hide();
}
// Show NAT area when "use nat" checkbox is clicked
\$("#USE_NAT").change(function() {
\$(".NAT").toggle();
\$("#actions").toggle();
});
// Time constraints