disable size unit select if resizable is false

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-16 15:50:32 -08:00
parent 3e03bc5ede
commit bbfdfa0f98

View File

@ -154,6 +154,9 @@ function addDiskLine (fieldset, busPrefix, busName, device, storage, storageOpti
sizeUnitSelect.add(new Option(element)); sizeUnitSelect.add(new Option(element));
}); });
sizeUnitSelect.value = sizeUnit; sizeUnitSelect.value = sizeUnit;
if (!diskConfig[type][busPrefix].resizable) {
sizeUnitSelect.disabled = true;
}
field.append(sizeUnitSelect); field.append(sizeUnitSelect);
let deleteDiv = document.createElement("div"); let deleteDiv = document.createElement("div");