feat: integrate with htmx
This commit is contained in:
@@ -27,22 +27,18 @@
|
||||
<button type="button"
|
||||
class="text-red-500"
|
||||
title="Ausbildung löschen"
|
||||
{{ stimulus_controller('modal-button', [], [], {'confirmation-modal': '#confirmation-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'confirmation', null, {
|
||||
'title': 'Bist du sicher?',
|
||||
'content': 'Möchtest du die Teilnahme an dieser Schulung wirklich löschen?',
|
||||
'target-url': path('app_admin_teamer_skills_training_attendance_delete', { 'uuid': attendance.uuid })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_teamer_skills_training_attendance_delete', { 'uuid': attendance.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
<button type="button"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Teilnahme hinzufügen',
|
||||
'url': path('app_admin_teamer_skills_training_attendance_create', { 'training_id': training.id, 'teamer_id': teamer.id })
|
||||
}) }}>
|
||||
title="Teilnahme hinzufügen"
|
||||
hx-get="{{ path('app_admin_teamer_skills_training_attendance_create', { 'training_id': training.id, 'teamer_id': teamer.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('calendar', 'w-4 h-4') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user