Compare commits

..

2 Commits

Author SHA1 Message Date
jordi fita mas ce4d29b83b Replace the htmx-only delete button for payments with a form
This way, it also works without JavaScript, that is not that important,
maybe, but i like that it does.
2024-09-09 11:33:10 +02:00
jordi fita mas 193409eed8 Add the menuitem role to expense’s delete button 2024-09-09 11:26:28 +02:00
2 changed files with 12 additions and 9 deletions

View File

@ -140,7 +140,7 @@
> >
{{ csrfToken }} {{ csrfToken }}
{{ deleteMethod }} {{ deleteMethod }}
<button class="icon"> <button class="icon" role="menuitem">
<i class="ri-delete-back-2-line"></i> <i class="ri-delete-back-2-line"></i>
{{( pgettext "Remove" "action" )}} {{( pgettext "Remove" "action" )}}
</button> </button>

View File

@ -105,15 +105,18 @@
</a> </a>
</li> </li>
<li role="presentation"> <li role="presentation">
<button role="menuitem" <form method="POST" action="{{ $.BaseURI }}/{{ .Slug }}"
data-hx-delete="{{ $.BaseURI }}/{{ .Slug }}" data-hx-boost="true"
data-hx-confirm="{{ $confirm }}"
data-hx-headers='{ {{ csrfHeader }} }'
data-hx-target="main" data-hx-target="main"
data-hx-confirm="{{ $confirm }}"
> >
{{ csrfToken }}
{{ deleteMethod }}
<button class="icon" role="menuitem">
<i class="ri-delete-back-2-line"></i> <i class="ri-delete-back-2-line"></i>
{{( pgettext "Remove" "action" )}} {{( pgettext "Remove" "action" )}}
</button> </button>
</form>
</li> </li>
</ul> </ul>
</details> </details>