{% block filter_text_widget %}
    {% if compound %}
        <div class="filter-pattern-selector">
            {{ form_widget(form.condition_pattern, {'attr': {'class': 'pattern-selector'} }) }}
            {{ form_widget(form.text, {'attr': attr}) }}
        </div>
    {% else %}
        {{ block('form_widget_simple') }}
    {% endif %}
{% endblock filter_text_widget %}

{% block filter_number_widget %}
    {% if compound %}
        <div class="filter-operator-selector">
            {{ form_widget(form.condition_operator, {'attr': {'class': 'operator-selector'} }) }}
            {{ form_widget(form.text, {'attr': attr}) }}
        </div>
    {% else %}
        {{ block('form_widget_simple') }}
    {% endif %}
{% endblock filter_number_widget %}

{% block filter_number_range_widget %}
    <div class="filter-number-range">
        {{ form_widget(form.left_number, {'attr': attr}) }}
        {{ form_widget(form.right_number, {'attr': attr}) }}
    </div>
{% endblock filter_number_range_widget %}

{% block filter_date_range_widget %}
    <div class="filter-date-range">
        {{ form_widget(form.left_date, {'attr': attr}) }}
        {{ form_widget(form.right_date, {'attr': attr}) }}
    </div>
{% endblock filter_date_range_widget %}

{% block filter_collection_adapter_widget %}
    {# only display the first element #}
    {{ form_widget(form[0]) }}
{% endblock filter_collection_adapter_widget %}
