feat: integrate with htmx
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
{{ form_row(form.dateFrom) }}
|
||||
{{ form_row(form.dateTo) }}
|
||||
@@ -39,28 +39,24 @@
|
||||
<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 den Zeitraum wirklich löschen?',
|
||||
'target-url': path('app_admin_system_availability_delete', { 'id': availability.id })
|
||||
}) }}>
|
||||
title="Zeitraum löschen"
|
||||
hx-get="{{ path('app_admin_system_availability_delete', { 'id': availability.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': 'Verfügbarkeit bearbeiten',
|
||||
'url': path('app_admin_system_availability_edit', { 'id': availability.id })
|
||||
}) }}>
|
||||
title="Verfügbarkeit bearbeiten"
|
||||
hx-get="{{ path('app_admin_system_availability_edit', { 'id': availability.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Verfügbarkeit duplizieren',
|
||||
'url': path('app_admin_system_availability_duplicate', { 'id': availability.id })
|
||||
}) }}>
|
||||
title="Verfügbarkeit duplizieren"
|
||||
hx-get="{{ path('app_admin_system_availability_duplicate', { 'id': availability.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('copy') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -80,11 +76,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_admin_system_availability_create')
|
||||
}) }}>
|
||||
title="Zeitraum hinzufügen"
|
||||
hx-get="{{ path('app_admin_system_availability_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Zeitraum hinzufügen
|
||||
</button>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Zeitraum hinzufügen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/availability/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du den Zeitraum wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Zeitraum duplizieren{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/availability/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Zeitraum bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/availability/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-4">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.email) }}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
@@ -1 +0,0 @@
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
@@ -39,20 +39,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 Ansprechperson wirklich löschen?',
|
||||
'target-url': path('app_admin_system_contact_delete', { 'id': contact.id })
|
||||
}) }}>
|
||||
title="Ansprechperson löschen"
|
||||
hx-get="{{ path('app_admin_system_contact_delete', { 'id': contact.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': 'Ansprechperson bearbeiten',
|
||||
'url': path('app_admin_system_contact_edit', { 'id': contact.id })
|
||||
}) }}>
|
||||
title="Ansprechperson bearbeiten"
|
||||
hx-get="{{ path('app_admin_system_contact_edit', { 'id': contact.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -71,11 +68,10 @@
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Ansprechperson hinzufügen',
|
||||
'url': path('app_admin_system_contact_create')
|
||||
}) }}>
|
||||
title="Ansprechperson hinzufügen"
|
||||
hx-get="{{ path('app_admin_system_contact_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Neu
|
||||
</button>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Ansprechperson hinzufügen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du <em>{{ contact }}</em> als Ansprechperson wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Ansprechperson bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/contact/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="pb-4">
|
||||
{{ form_row(form.displayName) }}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
aktualisieren
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
@@ -45,28 +45,21 @@
|
||||
<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 das Dokument wirklich löschen?',
|
||||
'target-url': path('app_admin_system_document_delete', { 'uuid': document.uuid })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_system_document_delete', { 'uuid': document.uuid }) }}"
|
||||
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': 'Dokument ersetzen',
|
||||
'url': path('app_admin_system_document_replace', { 'uuid': document.uuid })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_system_document_replace', { 'uuid': document.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('refresh') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Dokument umbenennen',
|
||||
'url': path('app_admin_system_document_edit', { 'uuid': document.uuid })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_system_document_edit', { 'uuid': document.uuid }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
<a href="{{ path('app_common_download', { 'uuid': document.uuid }) }}"
|
||||
@@ -90,11 +83,9 @@
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Dokumente hinzufügen',
|
||||
'url': path('app_admin_system_document_upload')
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_system_document_upload') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Dokumente hinzufügen
|
||||
</button>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du das Dokument <em>{{ document }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Dokument umbenennen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="pb-4">
|
||||
{{ form_row(form.displayName) }}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
aktualisieren
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,20 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Dokument ersetzen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_document'),
|
||||
'max_filesize': 5,
|
||||
'max_files': 1,
|
||||
'accepted_files': 'application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
ersetzen
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Dokumente hinzufügen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' }}) }}
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_document'),
|
||||
'max_filesize': 5,
|
||||
'accepted_files': 'application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
Uploads speichern
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
@@ -1,14 +0,0 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_document'),
|
||||
'max_filesize': 5,
|
||||
'max_files': 1,
|
||||
'accepted_files': 'application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
ersetzen
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
@@ -1,13 +0,0 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="pb-4">
|
||||
{% include '_partials/_upload_collection_form.html.twig' with {
|
||||
'endpoint_upload': path('_uploader_upload_document'),
|
||||
'max_filesize': 5,
|
||||
'accepted_files': 'application/pdf',
|
||||
} %}
|
||||
</div>
|
||||
<button type="submit" class="btn">
|
||||
Uploads speichern
|
||||
</button>
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
@@ -33,12 +33,10 @@
|
||||
<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 das Honorar wirklich löschen?',
|
||||
'target-url': path('app_admin_system_faq_delete', { 'id': faq.id })
|
||||
}) }}>
|
||||
title="FAQ löschen"
|
||||
hx-get="{{ path('app_admin_system_faq_delete', { 'id': faq.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_faq_edit', { 'id': faq.id }) }}">
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du die FAQ <em>{{ faq.question }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.nameInternal) }}
|
||||
@@ -39,28 +39,24 @@
|
||||
<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 das Honorar wirklich löschen?',
|
||||
'target-url': path('app_admin_system_fee_delete', { 'id': fee.id })
|
||||
}) }}>
|
||||
title="Honorar löschen"
|
||||
hx-get="{{ path('app_admin_system_fee_delete', { 'id': fee.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': 'Honorar bearbeiten',
|
||||
'url': path('app_admin_system_fee_edit', { 'id': fee.id })
|
||||
}) }}>
|
||||
title="Honorar bearbeiten"
|
||||
hx-get="{{ path('app_admin_system_fee_edit', { 'id': fee.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('edit') }}
|
||||
</button>
|
||||
<button type="button"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Honorar duplizieren',
|
||||
'url': path('app_admin_system_fee_duplicate', { 'id': fee.id })
|
||||
}) }}>
|
||||
title="Honorar duplizieren"
|
||||
hx-get="{{ path('app_admin_system_fee_duplicate', { 'id': fee.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('copy') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -79,11 +75,10 @@
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn"
|
||||
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
||||
{{ stimulus_action('modal-button', 'ajax', null, {
|
||||
'title': 'Honorar hinzufügen',
|
||||
'url': path('app_admin_system_fee_create')
|
||||
}) }}>
|
||||
title="Honorar hinzufügen"
|
||||
hx-get="{{ path('app_admin_system_fee_create') }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
Honorar hinzufügen
|
||||
</button>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Honorar hinzufügen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/fee/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du das Honorar <em>{{ fee.name }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Honorar duplizieren{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/fee/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Honorar bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/fee/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -34,12 +34,9 @@
|
||||
{% if is_granted('DELETE', feedbackSet) %}
|
||||
<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 das Jobprofil wirklich löschen?',
|
||||
'target-url': path('app_admin_system_feedback_set_delete', { 'id': feedbackSet.id })
|
||||
}) }}>
|
||||
hx-get="{{ path('app_admin_system_feedback_set_delete', { 'id': feedbackSet.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du die Feedback-Vorlage <em>{{ feedbackSet.name }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -55,12 +55,10 @@
|
||||
<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 das Jobprofil wirklich löschen?',
|
||||
'target-url': path('app_admin_system_job_profile_delete', { 'id': jobProfile.id })
|
||||
}) }}>
|
||||
title="Jobprofil löschen"
|
||||
hx-get="{{ path('app_admin_system_job_profile_delete', { 'id': jobProfile.id }) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend">
|
||||
{{ icon('delete') }}
|
||||
</button>
|
||||
<a href="{{ path('app_admin_system_job_profile_edit', { 'id': jobProfile.id }) }}">
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
Möchtest du das Jobprofil <em>{{ jobProfile.name }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% endblock %}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{{ form_start(form) }}
|
||||
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' } }) }}
|
||||
<div class="flex flex-col space-y-4 pb-8">
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
@@ -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 %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Fortbildung hinzufügen{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/training/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends 'htmx_confirmation_modal.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pb-4">
|
||||
Möchtest du die Fortbildung <em>{{ training.name }}</em> wirklich löschen?
|
||||
</div>
|
||||
{% set attendanceCount = training.trainingAttendances|length %}
|
||||
{% if attendanceCount > 0 %}
|
||||
<div class="font-bold">
|
||||
An dieser Fortbildung haben {{ attendanceCount }} Teamer:innern teilgenommen.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'htmx_modal.html.twig' %}
|
||||
|
||||
{% block title %}Fortbildung bearbeiten{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'admin/system/training/_form.html.twig' %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user