60 lines
2.5 KiB
Twig
60 lines
2.5 KiB
Twig
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
|
|
{{ form_start(form, { 'attr': formAttr.toArray() }) }}
|
|
{{ form_errors(form) }}
|
|
<div class="flex flex-col space-y-4 pb-4">
|
|
{{ form_row(form.name) }}
|
|
{{ form_row(form.subject) }}
|
|
{{ form_row(form.message) }}
|
|
</div>
|
|
<div class="flex flex-col space-y-4 pb-8">
|
|
{{ include('_partials/_mailing_placeholders.html.twig', { 'placeholders': placeholders }) }}
|
|
{{ include('_partials/_markdown_hint.html.twig') }}
|
|
</div>
|
|
|
|
<div class="pb-8">
|
|
<div class="font-bold">
|
|
Anhänge
|
|
</div>
|
|
<div class="pb-2 text-sm text-gray-500">
|
|
Sie gehen mit jeder Mail aus dieser Vorlage mit. Nur PDF, bis 5 MB je Datei und
|
|
{{ maxAttachmentBytes|file_size(0) }} zusammen.
|
|
</div>
|
|
{% if form.removeAttachments is defined %}
|
|
<ul class="flex flex-col space-y-1 pb-2">
|
|
{% for choice in form.removeAttachments %}
|
|
{% set attachment = template.attachments|filter(a => a.uuid == choice.vars.value)|first %}
|
|
<li class="flex items-center space-x-2 border rounded-sm px-2 py-1">
|
|
{{ icon('document', 'w-4 h-4 shrink-0') }}
|
|
<a href="{{ path('app_common_download', { 'uuid': attachment.uuid, 'inline': 1 }) }}"
|
|
target="_blank"
|
|
class="flex-1 underline">
|
|
{{ choice.vars.label }}
|
|
</a>
|
|
<span class="text-sm text-gray-500">{{ attachment.size|file_size(1) }}</span>
|
|
<label class="flex items-center space-x-1 text-sm">
|
|
{{ form_widget(choice) }}
|
|
<span>entfernen</span>
|
|
</label>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{{ include('_partials/_pending_uploads.html.twig', { 'uploads': pending }) }}
|
|
{% include '_partials/_upload_collection_form.html.twig' with {
|
|
'endpoint_upload': path('_uploader_upload_mailing_template'),
|
|
'max_filesize': 5,
|
|
'accepted_files': 'application/pdf',
|
|
} %}
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-2">
|
|
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
|
Speichern
|
|
</button>
|
|
<a href="{{ path('app_administrative_system_mailing_template_index') }}" class="btn btn--secondary">
|
|
Abbrechen
|
|
</a>
|
|
</div>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|