Allow select2 option for entityChoice filterOrderHelper

This commit is contained in:
2025-07-07 13:07:54 +02:00
parent 1a847d36a0
commit eed9913a49
2 changed files with 15 additions and 4 deletions

View File

@@ -68,10 +68,17 @@
{{ form_label(form.entity_choices[checkbox_name])}}
{% endif %}
<div class="col-sm-8 pt-2">
{% for c in form['entity_choices'][checkbox_name].children %}
{{ form_widget(c) }}
{{ form_label(c) }}
{% endfor %}
{% set field = form['entity_choices'][checkbox_name] %}
{% if field.vars.expanded %}
{# Render expanded checkboxes/radios #}
{% for c in field.children %}
{{ form_widget(c) }}
{{ form_label(c) }}
{% endfor %}
{% else %}
{# Render select dropdown #}
{{ form_widget(field) }}
{% endif %}
</div>
</div>
{% endfor %}