person: add show/hide on marital status date

This commit is contained in:
nobohan
2021-06-24 08:25:55 +02:00
parent 504b2efacf
commit c23ada3533
3 changed files with 37 additions and 4 deletions

View File

@@ -60,7 +60,7 @@
{%- endif -%}
</fieldset>
{%- if form.nationality is defined or form.spokenLanguages is defined or form.maritalStatus is defined -%}
{%- if form.nationality is defined or form.spokenLanguages is defined -%}
<fieldset>
<legend><h2>{{ 'Administrative information'|trans }}</h2></legend>
{%- if form.nationality is defined -%}
@@ -69,11 +69,21 @@
{%- if form.spokenLanguages is defined -%}
{{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }}
{%- endif -%}
</fieldset>
{%- endif -%}
{%- if form.numberOfChildren is defined or form.maritalStatus is defined -%}
<fieldset>
<legend><h2>{{ 'Marital status'|trans }}</h2></legend>
{{ form_row(form.numberOfChildren, {'label' : 'Number of children'}) }}
{%- if form.maritalStatus is defined -%}
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }}
{{ form_row(form.maritalStatusDate, { 'label' : 'Date of last marital status change'} ) }}
{{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }}
<div id="maritalStatus">
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }}
</div>
<div id="maritalStatusDate">
{{ form_row(form.maritalStatusDate, { 'label' : 'Date of last marital status change'} ) }}
{{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }}
</div>
{%- endif -%}
</fieldset>
{%- endif -%}