La til endring av databasen og sjekk av ridstreng
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user