feat: instant preview of edited email template

This commit is contained in:
Björn Fromme
2026-08-17 12:17:05 +02:00
parent 489aafed3e
commit 0e1df6da7c
12 changed files with 250 additions and 58 deletions
@@ -1,4 +1,4 @@
{{ form_start(form) }}
{{ form_start(form, { 'attr': { 'id': 'email-text-form' } }) }}
<div class="flex flex-col space-y-4 pb-8">
{{ form_row(form.subject) }}
{{ form_row(form.headline) }}
@@ -20,8 +20,22 @@
</div>
</div>
</div>
<button type="submit" class="btn">
Speichern
</button>
<div class="flex items-center space-x-2">
<button type="submit" class="btn">
Speichern
</button>
<a href="{{ path('app_admin_system_email_text_index') }}" class="btn btn--secondary">
Abbrechen
</a>
{% if emailText.id is not null %}
<button type="button"
class="btn btn--secondary text-red-500"
hx-get="{{ path('app_admin_system_email_text_reset', { 'key': definition.key.value }) }}"
hx-target="body"
hx-swap="beforeend">
Auf Standard zurücksetzen
</button>
{% endif %}
</div>
{{ form_rest(form) }}
{{ form_end(form) }}