-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathform.html.twig
32 lines (30 loc) · 1.43 KB
/
form.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{% trans_default_domain 'ranky_media' %}
{% block ranky_media_file_manager_label %}
{{ block('form_label') }}
{% endblock %}
{% block ranky_media_file_manager_widget %}
{% apply spaceless %}
<div class="ranky-media-form-type ranky-media-form-type--{{ form.vars.name }} ranky-media-form-type--selection-{{- form.vars.multiple_selection ? 'multiple' : 'single' -}}"
id="ranky-media-form-type-{{- form.vars.id -}}">
<div class="ranky-media-form-type__label">
{{ form_label(form) }}
</div>
<div class="ranky-media-form-type__help">
{{ form_help(form) }}
</div>
<div class="ranky-media-form-type__content"
id="ranky-media-form-type__content-{{- form.vars.id -}}"
data-api-prefix="{{- form.vars.api_prefix ?? ranky_media_api_prefix ?? '' -}}"
data-field-id="{{- form.vars.id -}}"
data-title="{{- form.vars.modal_title -}}"
data-multiple-selection="{{- form.vars.multiple_selection -}}"
>
</div>
{% set customValue = value.id ?? value %}
<input type="hidden" {{ block('widget_attributes') }} {% if customValue %} value="{{ customValue }}" {% endif %}/>
<div class="ranky-media-form-type__error">
{{ form_errors(form) }}
</div>
</div>
{% endapply %}
{% endblock %}