Bug #7154
closedfirewall_nat_edit JS function check_for_aliases()
100%
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
Updated by Phillip Davis almost 9 years ago
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
Updated by Anonymous almost 9 years ago
- Status changed from New to Feedback
Looks like that duplication (several times over) goes back to at least 2.0!
Now removed. Page still functions as intended
Updated by Anonymous almost 9 years ago
- % Done changed from 0 to 100
Applied in changeset b39cebf6f09b7d110d810e3ccff0136751aa1718.
Updated by Phillip Davis almost 9 years ago
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.