diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index 5382cb95b..cee55786e 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -350,6 +350,7 @@ if ($snapshots!=null && count($snapshots) && !$boolNew) { + @@ -1493,6 +1494,10 @@ foreach ($arrConfig['nic'] as $i => $arrNic) { $strLabel = ($i > 0) ? appendOrdinalSuffix($i + 1) : ''; $disabled = $arrNic['network']=='wlan0' ? 'disabled' : ''; ?> +
@@ -2024,12 +2029,17 @@ var storageType = ""; var storageLoc = ""; function updateMAC(index,port) { + const prevPort = previousPorts[index]; + previousPorts[index] = port; $('input[name="nic['+index+'][mac]"').prop('disabled',port=='wlan0'); $('i.mac_generate.'+index).prop('disabled',port=='wlan0'); $('span.wlan0').removeClass('hidden'); - if (port != 'wlan0') { - $('span.wlan0').addClass('hidden'); - $('i.mac_generate.'+index).click(); + if (port !== 'wlan0') { + $('span.wlan0').addClass('hidden'); + if (prevPort === 'wlan0') { + // Only click if previous port was wlan0 + $('i.mac_generate.' + index).click(); + } } }
_(Network MAC)_: