27 lines
1012 B
Twig
27 lines
1012 B
Twig
{% set formAttr = stimulus_controller('form-upload-guard')|stimulus_action('form-upload-guard', 'guard', 'submit') %}
|
|
{{ form_start(form, { 'attr': { 'hx-post': app.request.uri, 'hx-target': '#htmx-modal', 'hx-swap': 'outerHTML' }|merge(formAttr.toArray()) }) }}
|
|
<div class="flex flex-col space-y-4 pb-4">
|
|
{{ form_row(form.category) }}
|
|
{{ form_row(form.name) }}
|
|
{{ form_row(form.email) }}
|
|
{{ form_row(form.phone) }}
|
|
{{ form_row(form.destination) }}
|
|
<div>
|
|
<h4 class="font-bold pb-2">
|
|
Foto
|
|
</h4>
|
|
{% include '_partials/_upload_collection_form.html.twig' with {
|
|
'endpoint_upload': path('_uploader_upload_photo'),
|
|
'max_filesize': 5,
|
|
'max_files': 1,
|
|
'accepted_files': 'image/jpg,image/jpeg',
|
|
} %}
|
|
{{ form_errors(form) }}
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
|
speichern
|
|
</button>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|