-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathfield.html.twig
More file actions
52 lines (52 loc) · 2.01 KB
/
field.html.twig
File metadata and controls
52 lines (52 loc) · 2.01 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% block field %}
<div class="form-field {{ layout_form_field_outer_classes|trim -}} {{- form_field_outer_core|trim -}}">
{% block contents %}
{%- block label -%}
{% if show_label %}
<div class="{{- layout_form_field_outer_label_classes -}}">
{{- form_field_toggleable -}}
<label class="{{ layout_form_field_label_classes }}{{ form_field_label_trim }}" {% if field.id %}for="{{ form_field_for }}"{% endif %}>
{%- if form_field_help -%}
<span class="tooltip" data-tooltip="{{ form_field_help }}">{{ form_field_label|raw }}</span>
{%- else -%}
{{ form_field_label|raw }}
{%- endif -%}
{%- if form_field_required %}
<span class="required">*</span>
{%- endif -%}
</label>
</div>
{% endif %}
{%- endblock -%}
<div class="{{ layout_form_field_outer_data_classes }}"
{% block global_attributes %}{% endblock %}
>
{% block group %}
{% block input %}
<div class="{{ layout_form_field_wrapper_classes }} {{ field.size }}">
{% block prepend %}{% endblock prepend %}
<input
name="{{ (scope ~ field.name)|fieldName }}"
value="{{ value|join(', ')|e }}"
{% block input_attributes %}{% endblock %}
/>
{% block append %}{% endblock append %}
{% if inline_errors and errors %}
<div class="{{ form_field_inline_error_classes }}">
<p class="form-message"><i class="fa fa-exclamation-circle"></i> {{ errors|first|raw }}</p>
</div>
{% endif %}
</div>
{% endblock %}
{% endblock %}
{% if field.description is defined %}
<div class="{{ form_field_extra_wrapper_classes }}">
<span class="form-description">
{{ form_field_description|raw }}
</span>
</div>
{% endif %}
</div>
{% endblock %}
</div>
{% endblock %}