Add Domain name form may not reset unneeded form values properly
Steps to Reproduce:
- Click new domain name record
- Select "a" record type
- Enter an IP address
- Change to "cname"
- Fill in a server name
- Post the form
Expected
Changing the type would have cleared the IP address, similarly to how changing to other types clears the server name. If there were errors posting the form (e.g. entering a private IP), the drop down selection box should be disabled, similar to the edit form, were it not expected that the type would be changed at this point.
The unexpected, but actual:
Posting form will result in an error (with typo): You cannot set both a server name and IP Address. If you entering an MX record just put the server name.
The drop down is still editable, but has no change event handler as it is nested only in the if chosen_category_value == ""
branch.
These could go on another report, but I'm getting lazy now: Add CNAME to the list of requirements in "Server name is required for MX and SRV records.". Perhaps this oversight is related to the value not being loaded upon the edit of a CNAME as well? There is no validation of the cname server value - I can enter a value with zero periods, or something that looks like an IP address.