La til endring av databasen og sjekk av ridstreng

This commit is contained in:
Trygve
2025-10-30 23:21:49 +01:00
parent f2ede38dca
commit 5b62326c42
6 changed files with 115 additions and 12 deletions

View File

@@ -63,5 +63,15 @@
</script>
<script src="/lib/htmx.min.js"></script>
<script>
document.body.addEventListener('htmx:beforeSwap', function(evt) {
// Allow 422 and 400 responses to swap
// We treat these as form validation errors
if (evt.detail.xhr.status === 422 || evt.detail.xhr.status === 400) {
evt.detail.shouldSwap = true;
evt.detail.isError = false;
}
});
</script>
</body>
</html>