{% extends 'form_div_layout.html.twig' %} {% block form_row -%}
{%- for child in form %} {% endfor -%}
{%- endblock choice_widget_expanded -%} #} {%- block choice_widget_collapsed -%} {%- if required and placeholder is none and not placeholder_in_choices and not multiple and (attr.size is not defined or attr.size <= 1) -%} {% set required = false %} {%- endif -%} {%- endblock choice_widget_collapsed -%} {%- block textarea_widget -%} {% set attr = attr|merge({class: (attr.class|default('') ~ 'materialize-textarea')|trim}) %} {{ parent() }} {%- endblock -%} {# ERRORS MGT #} {%- block form_errors -%} {%- if errors|length > 0 -%} {%- for error in errors -%} {%- endfor -%} {%- endif -%} {%- endblock form_errors -%} {%- block widget_attributes -%} {% if errors|length > 0 %} {% set _class = 'invalid' %} {% if attr.class is defined %} {% set _class = _class ~ ' ' ~ attr.class|trim %} {% endif %} {% set attr = attr|merge({'class': _class}) %} {% endif %} {{- parent() -}} {%- endblock widget_attributes -%} {# ERRORS MGT END #} {# FileType #} {% block file_widget -%} <{{ element|default('div') }} class="file-field input-field">