feat: integrate with htmx
This commit is contained in:
@@ -33,20 +33,17 @@
|
||||
<div class="flex items-center space-x-2 justify-end">
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'confirmation', null, {
|
||||
'title': 'Bist du sicher?',
|
||||
'content': 'Möchtest du die Fortbildung wirklich löschen?',
|
||||
'target-url': path('app_admin_system_training_delete', { 'id': training.id })
|
||||
}) }}>
|
||||
title="Fortbildung löschen"
|
||||
hx-get="{{ path('app_admin_system_training_delete', { 'id': training.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Fortbildung bearbeiten',
|
||||
'url': path('app_admin_system_training_edit', { 'id': training.id })
|
||||
}) }}>
|
||||
title="Fortbildung bearbeiten"
|
||||
hx-get="{{ path('app_admin_system_training_edit', { 'id': training.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -65,11 +62,10 @@
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Fortbildung hinzufügen',
|
||||
'url': path('app_admin_system_training_create')
|
||||
}) }}>
|
||||
title="Fortbildung hinzufügen"
|
||||
hx-get="{{ path('app_admin_system_training_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Fortbildung hinzufügen
|
||||
</button>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user