Implement configurable HTMX method

This commit is contained in:
Mark Veidemanis 2023-03-09 12:25:29 +00:00
parent 96dc21019b
commit f10400b3c4
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@
{% for button in extra_buttons %} {% for button in extra_buttons %}
<button <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-delete="{{ button.url }}" hx-{{ button.method }}="{{ button.url }}"
hx-trigger="click" hx-trigger="click"
hx-target="#modals-here" hx-target="#modals-here"
hx-swap="innerHTML" hx-swap="innerHTML"

View File

@ -42,7 +42,7 @@
{% for button in extra_buttons %} {% for button in extra_buttons %}
<button <button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-delete="{{ button.url }}" hx-{{ button.method }}="{{ button.url }}"
hx-trigger="click" hx-trigger="click"
hx-target="#modals-here" hx-target="#modals-here"
hx-swap="innerHTML" hx-swap="innerHTML"