Refactored alpinejs in forms for better maintainability

This commit is contained in:
2025-02-16 11:26:57 +11:00
parent 07453b0f02
commit fa64b05415
6 changed files with 120 additions and 86 deletions

View File

@@ -43,7 +43,7 @@ templ Global() {
// htmx.logAll();
</script>
<script>
const popups = {
const bodyData = {
showError: false,
showConfirmPasswordModal: false,
handleHtmxBeforeOnLoad(event) {
@@ -78,7 +78,7 @@ templ Global() {
</head>
<body
class="bg-base text-text ubuntu-mono-regular overflow-x-hidden"
x-data="popups"
x-data="bodyData"
x-on:htmx:error="handleHtmxError($event)"
x-on:htmx:before-on-load="handleHtmxBeforeOnLoad($event)"
>