Bug #6007
closedJavaScript error in firewall_nat_edit.php for protocols that do not use ports
100%
Description
1) Make a NAT Port Forward rule with some protocol that is not TCP or UDP - e.g. ICMP.
2) Turn on the developer stuff in your browser.
3) Edit the rule.
An error like this is reported:
Uncaught Error: cannot call methods on selectmenu prior to initialization; attempted to call method 'refresh'
It happens in function proto_change() on lines like:
$('#dstbeginport').prop("selectedIndex", 0).selectmenu('refresh');
$('#dstendport').prop("selectedIndex", 0).selectmenu('refresh');
$('#localbeginport').prop("selectedIndex", 0).selectmenu('refresh');
These lines are only executed if the protocol is not TCP or UDP.
This seems to result in odd stuff if you then select TCP as the protocol. The destination port from and to fields are displayed, but it shows from Other to Any.
Does someone know what was intended by that code, and what to do to get the selectmenu method to work?