hide device input if device input is not required
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
ca59f11bdb
commit
f3b9a5d81e
@ -113,19 +113,16 @@ function addDiskLine (fieldset, busPrefix, busName, device, diskDataParsed, stor
|
|||||||
busLabel.innerHTML = busName;
|
busLabel.innerHTML = busName;
|
||||||
field.append(busLabel);
|
field.append(busLabel);
|
||||||
|
|
||||||
if (device) {
|
|
||||||
let deviceInput = document.createElement("input");
|
let deviceInput = document.createElement("input");
|
||||||
deviceInput.type = "number";
|
deviceInput.type = "number";
|
||||||
deviceInput.min = 0;
|
deviceInput.min = 0;
|
||||||
deviceInput.max = diskConfig[type][busPrefix].limit;
|
deviceInput.max = diskConfig[type][busPrefix].limit;
|
||||||
deviceInput.value = device;
|
deviceInput.value = device;
|
||||||
field.append(deviceInput);
|
if (!device) {
|
||||||
}
|
deviceInput.disabled = true;
|
||||||
else {
|
|
||||||
let deviceInput = document.createElement("div");
|
|
||||||
deviceInput.classList.add("hidden");
|
deviceInput.classList.add("hidden");
|
||||||
field.append(deviceInput);
|
|
||||||
}
|
}
|
||||||
|
field.append(deviceInput);
|
||||||
|
|
||||||
let storage = diskDataParsed.storage;
|
let storage = diskDataParsed.storage;
|
||||||
let storageSelect = document.createElement("select");
|
let storageSelect = document.createElement("select");
|
||||||
|
Loading…
Reference in New Issue
Block a user