{#
  Variables
    - form
#}
{% block _leadlist_filters_widget %}
  {% for i, filter in form %}
    {% set isPrototype = '__name__' == filter.vars.name %}
    {% set isBehavior = form.parent.vars.fields.behaviors[filter.vars.value.field] is defined %}
    {% for object, objectfields in form.parent.vars.fields %}
      {% set isField = objectfields[filter.vars.value.field] is defined %}
      {% if (isPrototype or isField or isBehavior) and not filter.isRendered %}
        {{ form_widget(filter, {'first': (0 == i)}) }}
      {% endif %}
    {% endfor %}
  {% endfor %}
{% endblock %}
