22 lines
876 B
Twig
22 lines
876 B
Twig
{% extends 'htmx_modal.html.twig' %}
|
|
|
|
{% block title %}{{ modalTitle }}{% endblock %}
|
|
|
|
{% block content %}
|
|
{% 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="pb-4">
|
|
{% include '_partials/_upload_collection_form.html.twig' with {
|
|
'endpoint_upload': path(endpointUpload),
|
|
'max_filesize': 5,
|
|
'max_files': 1,
|
|
'accepted_files': 'image/jpg,image/jpeg,application/pdf',
|
|
} %}
|
|
</div>
|
|
<button type="submit" class="btn" {{ stimulus_target('form-upload-guard', 'submit') }}>
|
|
Upload speichern
|
|
</button>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|