fixes #11473 - remove re-init of domain select2 on env selection
After an environment was selected, the reloadOnAjaxComplete function re-initialised every select2, but other dropdowns triggered onContentLoad which excluded those with the without_select class.
Change reloadOnAjaxComplete to be consistent and also explicitly re-init the subnet dropdown when the domain dropdown causes it to change.
Also destroy select2 fields before storing the interface in the "hidden" storage, allowing it to be re-initialised when the modal is displayed again.
Related issues
Bug #11473: Not able to set domain in interfaces initially
fixes #11473 - remove re-init of domain select2 on env selection
After an environment was selected, the reloadOnAjaxComplete function
re-initialised every select2, but other dropdowns triggered
onContentLoad which excluded those with the without_select class.
Change reloadOnAjaxComplete to be consistent and also explicitly
re-init the subnet dropdown when the domain dropdown causes it to
change.
Also destroy select2 fields before storing the interface in the
"hidden" storage, allowing it to be re-initialised when the modal
is displayed again.