{# Widgets #} {# This file doesn't seem to be used anymore ; commenting it for now in order not to mess with user's configurations. TODO: Remove it and all of its references #} {# {% block choice_widget %} {% spaceless %} {% if expanded %}
{% for child in form %}
{% set form_widget_content %} {{ form_widget(child) }} {% endset %} {{ form_label(child, null, { 'in_list_checkbox' : true, 'widget' : form_widget_content } ) }}
{% endfor %}
{% else %}
{% if empty_value is not none %}
{{ empty_value|trans({}, translation_domain) }}
{% endif %} {% if preferred_choices|length > 0 %} {% set options = preferred_choices %} {{ block('choice_widget_options') }} {% if choices|length > 0 and separator is not none %}
{{ separator }}
{% endif %} {% endif %} {% set options = choices %} {{ block('choice_widget_options') }}
{% endif %} {% endspaceless %} {% endblock choice_widget %} {% block form_widget_simple %} {% spaceless %} {% set type = type|default('text') %}
{% endspaceless %} {% endblock form_widget_simple %} {# Labels #} {% block form_label %} {% spaceless %} {% if not compound %} {% set attr = attr|merge({'for': id}) %} {% endif %} {% if required %} {% set attr = attr|merge({'class': attr.class|default('') ~ ' required'}) %} {% endif %} {% if in_list_checkbox is defined and in_list_checkbox and widget is defined %}
{{ widget|raw }}
{{ label|trans({}, translation_domain) }}
{% else %}
{{ label|trans({}, translation_domain) }} {% endif %} {% endspaceless %} {% endblock %} {# Rows #} {% block form_row %} {% spaceless %}
{{ form_label(form, label|default(null)) }}
{{ form_widget(form) }} {{ form_errors(form) }}
{% endspaceless %} {% endblock form_row %} {# Misc #} {% block form_errors %} {% spaceless %} {% if errors|length > 0 %} {% if not form.parent or 'repeated' in form.vars['block_prefixes'] %}
{% endif %}
{% for error in errors %} {% if loop.first %} {{ error.messageTemplate|trans(error.messageParameters, 'validators') }} {% endif %} {% endfor %}
{% if not form.parent or 'repeated' in form.vars['block_prefixes'] %}
{% endif %} {% endif %} {% endspaceless %} {% endblock form_errors %} #}