FIX [regroupment][form] add check to display regroupment field in the form or not. Only if regroupments exist

This commit is contained in:
2023-03-02 10:52:48 +01:00
parent 88ccbd450a
commit 678defdee7
2 changed files with 9 additions and 6 deletions

View File

@@ -41,9 +41,10 @@
<h3 class="m-3">{{ 'Center'|trans }}</h3>
{{ form_widget(form.centers.center) }}
<h3 class="m-3">{{ 'Pick aggregated centers'|trans }}</h3>
{{ form_widget(form.centers.regroupment) }}
{% if form.centers.regroupment is defined %}
<h3 class="m-3">{{ 'Pick aggregated centers'|trans }}</h3>
{{ form_widget(form.centers.regroupment) }}
{% endif %}
</section>
<p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action btn-create' }, 'label' : 'Go to export options' } ) }}</p>