mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-30 09:45:31 +00:00
Nach Typ suchen
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
<script type="module">
|
||||
let fieldset = document.querySelector("fieldset.selectgroup");
|
||||
let checkboxes = Array.from(fieldset.querySelectorAll('input[type="checkbox"]'));
|
||||
fieldset.addEventListener("change", (event) => {
|
||||
let target = event.target;
|
||||
if (target.type === "checkbox") {
|
||||
let name = target.name;
|
||||
let checked = target.checked;
|
||||
if (!checked) {
|
||||
let allchecked = checkboxes.filter((checkbox) => checkbox.checked);
|
||||
if (allchecked.length === 0) {
|
||||
target.checked = true;
|
||||
if (fieldset) {
|
||||
let checkboxes = Array.from(fieldset.querySelectorAll('input[type="checkbox"]'));
|
||||
fieldset.addEventListener("change", (event) => {
|
||||
let target = event.target;
|
||||
if (target.type === "checkbox") {
|
||||
let name = target.name;
|
||||
let checked = target.checked;
|
||||
if (!checked) {
|
||||
let allchecked = checkboxes.filter((checkbox) => checkbox.checked);
|
||||
if (allchecked.length === 0) {
|
||||
target.checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const form = document.getElementById("simplesearchform");
|
||||
let submitBtn = null;
|
||||
|
||||
Reference in New Issue
Block a user