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.
This commit is contained in:
parent
193409eed8
commit
ce4d29b83b
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue