Abschluss Personen & Startseite. Viele BUGFIXes

This commit is contained in:
Simon Martens
2025-02-28 16:54:49 +01:00
parent db8c08a0fc
commit 4581f34dd9
132 changed files with 333 additions and 86 deletions

View File

@@ -77,6 +77,8 @@
<label for="almstring" class="col-span-3 align-middle hidden">Almanach-Nummer:</label>
<input
autocomplete="off"
minlength="1"
required="true"
type="search"
name="almstring"
id="almstring"
@@ -324,3 +326,40 @@
<div class="container-normal">Keine Bände gefunden.</div>
{{- end -}}
{{- end -}}
<script type="module">
const form = document.getElementById("simplesearchform");
let submitBtn = null;
if (form) {
submitBtn = form.querySelector("#submitbutton");
}
function checkValidity(f, btn) {
if (f.checkValidity()) {
btn.disabled = false;
} else {
btn.disabled = true;
}
}
if (form && submitBtn) {
checkValidity(form, submitBtn);
form.addEventListener("input", (event) => {
checkValidity(form, submitBtn);
});
}
const lookupform = document.getElementById("lookupform");
let lookupsubmitBtn = null;
if (lookupform) {
lookupsubmitBtn = lookupform.querySelector("#submitbutton");
}
if (lookupform && lookupsubmitBtn) {
checkValidity(lookupform, lookupsubmitBtn);
lookupform.addEventListener("input", (event) => {
checkValidity(lookupform, lookupsubmitBtn);
});
}
</script>

View File

@@ -4,7 +4,6 @@
<div id="searchcontrol" class="container-normal">
{{- template "_heading" $model.parameters -}}
<div id="" class="border-l border-zinc-300 px-8 py-10 relative">
{{- if not $model.parameters.Extended -}}
<form
id="searchform"
class="w-full font-serif"
@@ -38,6 +37,10 @@
<input type="checkbox" name="annotations" id="annotations" checked />
<label for="annotations">Anmerkungen</label>
</div>
<div class="selectgroup-option">
<input type="checkbox" name="year" id="year" checked />
<label for="year">Jahr</label>
</div>
</fieldset>
{{ template "_infotextsimple" true }}
</div>

View File

@@ -22,26 +22,3 @@
<i class="ri-arrow-right-long-line"></i> Erweiterte Suche
</a>
{{ end }}
<script type="module">
const form = document.getElementById("simplesearchform");
if (form) {
const submitBtn = form.getElementById("submitbutton");
}
function checkValidity() {
if (form.checkValidity()) {
submitBtn.disabled = false;
} else {
submitBtn.disabled = true;
}
}
checkValidity();
if (form && submitBtn) {
form.addEventListener("input", (event) => {
checkValidity();
});
}
</script>