mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 17:25:32 +00:00
Abschluss Personen & Startseite. Viele BUGFIXes
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user