Can create devices nicely

This commit is contained in:
2025-03-24 09:43:41 +01:00
parent 6405e7d692
commit c459148d33
9 changed files with 233 additions and 54 deletions

16
static/scripts.js Normal file
View File

@@ -0,0 +1,16 @@
function newOption(elementId, name) {
var el = document.getElementById(elementId)
if (el.value !== "New...") {
return
}
var newValue = window.prompt("Enter " + name + " Name")
if (newValue === null) {
return;
}
var child = document.createElement("option")
child.value = newValue
child.innerText = newValue
el.prepend(child)
el.value = newValue
}