adapt UI and controller for Person without centers

This commit is contained in:
2021-09-03 12:41:41 +02:00
parent 2450655452
commit 5b70fb2ee5
14 changed files with 196 additions and 53 deletions

View File

@@ -146,10 +146,10 @@
{% endif %}
{% endif %}
</li>
{% if options['addCenter'] %}
{% if options['addCenter'] and person|chill_resolve_center is not null %}
<li>
<i class="fa fa-li fa-long-arrow-right"></i>
{{ person.center }}
{{ person|chill_resolve_center.name }}
</li>
{% endif %}
</ul>

View File

@@ -17,11 +17,11 @@
{%- endif -%}
</div>
<div class="text-md-end">
{%- if chill_person.fields.spoken_languages == 'visible' -%}
{% if person|chill_resolve_center is not null%}
<span class="open_sansbold">
{{ 'Center'|trans|upper}} :
</span>
{{ person.center.name|upper }}
{{ person|chill_resolve_center.name|upper }}
{%- endif -%}
</div>
</div>

View File

@@ -76,10 +76,9 @@
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
<div style="display: none">
{# TODO remove this field (vendee) #}
{{ form_row(form.center, { 'label' : 'Center'|trans }) }}
</div>
{% if form.center is defined %}
{{ form_row(form.center) }}
{% endif %}
<ul class="record_actions sticky-form-buttons">
<li class="dropdown">