Bug #7154
closed
firewall_nat_edit JS function check_for_aliases()
Added by Phillip Davis almost 9 years ago.
Updated over 8 years ago.
Description
The code in this function seems to be ineffective. e.g. it has sequences like:
if ($('#dstbeginport_cust').val() == customarray[i]) {
$('#dstendport_cust').val(customarray[i]);
$('#localbeginport_cust').val(customarray[i]);
disableInput('dstendport_cust', true);
disableInput('localbeginport', true);
disableInput('localbeginport_cust', true);
disableInput('dstendport_cust', false);
disableInput('localbeginport', false);
disableInput('localbeginport_cust', false);
}
which disables various input fields then enables them again.
Needs to:
1) Define the requirement
2) Implement whatever is required
I suspect the requirement might be:
If the user enters a port alias in any of destination from/to (dest begin, dest end) or redirect target port (local port) custom fields then:
- copy that port alias to the other 2 cust fields so all 3 are the same
- make sure all 3 selectors (dest begin, dest end, local port) are set to "Other"
- disable dest end and local port fields (leaving just dest begin fields
If the user changes "dest begin" to some other selection, or changes the port alias to a real port number, then
- re-enable the dest end and local port fields
- blank out the port alias that was copied to those fields
- do whatever else would normally be done in reaction to a non-port-alias entry
- Assignee set to Anonymous
- Status changed from New to Feedback
- % Done changed from 0 to 100
Yes, the code did nothing effective. I guess that someone had started thinking about what smarts to put in it, had "temporarily" put the reverse bits at the end of each section and then never got around to sorting it all out.
- Status changed from Feedback to Resolved
Also available in: Atom
PDF