feat: integrate with htmx

This commit is contained in:
Björn Fromme
2024-02-07 10:15:59 +01:00
parent 4d1799ca49
commit 1e572606f8
154 changed files with 1447 additions and 1461 deletions
@@ -32,12 +32,9 @@
{% if is_granted('DELETE', availability) %}
<button type="button"
title="Zeitraum entfernen/löschen"
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
{{ stimulus_action('modal-button', 'confirmation', null, {
'title': 'Bist du sicher?',
'content': 'Möchtest du den Zeitraum wirklich löschen?',
'target-url': path('app_teamer_profile_availability_delete', { 'id': availability.id })
}) }}>
hx-get="{{ path('app_teamer_profile_availability_delete', { 'id': availability.id }) }}"
hx-target="body"
hx-swap="beforeend">
{{ icon('delete', 'w-5 h-5') }}
</button>
{% endif %}
@@ -89,11 +86,10 @@
</div>
<button type="button"
class="btn"
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
{{ stimulus_action('modal-button', 'ajax', null, {
'title': 'Zeitraum hinzufügen',
'url': path('app_teamer_profile_availability_create')
}) }}>
title="Eigenen Zeitraum hinzufügen"
hx-get="{{ path('app_teamer_profile_availability_create') }}"
hx-target="body"
hx-swap="beforeend">
Eigenen Zeitraum hinzufügen
</button>
{% endblock %}