mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
renamed file and disabled hidden inputs
This commit is contained in:
parent
1b7e22470a
commit
5d05d30c4d
2 changed files with 7 additions and 1 deletions
|
@ -5,7 +5,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Konfiguration</title>
|
<title>Konfiguration</title>
|
||||||
<link rel="stylesheet" href="/style.css" />
|
<link rel="stylesheet" href="/style.css" />
|
||||||
<script src="/script.js" defer></script>
|
<script src="/input-visibility.js" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Konfiguration</h1>
|
<h1>Konfiguration</h1>
|
||||||
|
|
|
@ -8,8 +8,14 @@ function updateVisibility() {
|
||||||
const input = form.querySelector(`#${element.dataset.field}`);
|
const input = form.querySelector(`#${element.dataset.field}`);
|
||||||
if (element.dataset.values.split("|").includes(input.value)) {
|
if (element.dataset.values.split("|").includes(input.value)) {
|
||||||
element.classList.remove("hidden");
|
element.classList.remove("hidden");
|
||||||
|
element
|
||||||
|
.querySelectorAll("input, select, button, textarea")
|
||||||
|
.forEach((childInput) => (childInput.disabled = false));
|
||||||
} else {
|
} else {
|
||||||
element.classList.add("hidden");
|
element.classList.add("hidden");
|
||||||
|
element
|
||||||
|
.querySelectorAll("input, select, button, textarea")
|
||||||
|
.forEach((childInput) => (childInput.disabled = true));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue