This commit is contained in:
Mathieu Jaumotte 2021-07-08 12:27:50 +02:00
parent 198c815052
commit 1c45770929

View File

@ -21,10 +21,11 @@
{% block title %}{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %} {% block title %}{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %} {% block personcontent %}
<div class="person-edit">
<h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1> <h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1>
{% form_theme form '@ChillMain/Form/fields.html.twig' %}
{% form_theme form '@ChillMain/Form/fields.html.twig' %}
{{ form_start(form) }} {{ form_start(form) }}
{% if form.memo is defined %} {% if form.memo is defined %}
@ -42,6 +43,7 @@
{{ form_widget(form.altNames, { 'label': 'Alternative names'}) }} {{ form_widget(form.altNames, { 'label': 'Alternative names'}) }}
{% endif %} {% endif %}
{{ form_row(form.gender, {'label' : 'Gender'}) }} {{ form_row(form.gender, {'label' : 'Gender'}) }}
{{ form_row(form.genderComment, { 'label' : 'Comment on the gender'} ) }}
</fieldset> </fieldset>
<fieldset> <fieldset>
@ -53,9 +55,12 @@
{%- if form.countryOfBirth is defined -%} {%- if form.countryOfBirth is defined -%}
{{ form_row(form.countryOfBirth, { 'label' : 'Country of birth' } ) }} {{ form_row(form.countryOfBirth, { 'label' : 'Country of birth' } ) }}
{%- endif -%} {%- endif -%}
{%- if form.deathdate is defined -%}
{{ form_row(form.deathdate, { 'label' : 'Date of death' } ) }}
{%- endif -%}
</fieldset> </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> <fieldset>
<legend><h2>{{ 'Administrative information'|trans }}</h2></legend> <legend><h2>{{ 'Administrative information'|trans }}</h2></legend>
{%- if form.nationality is defined -%} {%- if form.nationality is defined -%}
@ -64,8 +69,21 @@
{%- if form.spokenLanguages is defined -%} {%- if form.spokenLanguages is defined -%}
{{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }} {{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }}
{%- endif -%} {%- 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 -%} {%- if form.maritalStatus is defined -%}
<div id="maritalStatus">
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }} {{ 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 -%} {%- endif -%}
</fieldset> </fieldset>
{%- endif -%} {%- endif -%}
@ -74,13 +92,28 @@
<fieldset> <fieldset>
<legend><h2>{{ 'Contact information'|trans }}</h2></legend> <legend><h2>{{ 'Contact information'|trans }}</h2></legend>
{%- if form.email is defined -%} {%- if form.email is defined -%}
<div id="personEmail">
{{ form_row(form.email, {'label': 'Email'}) }} {{ form_row(form.email, {'label': 'Email'}) }}
</div>
<div id="personAcceptEmail">
{{ form_row(form.acceptEmail, {'label' : 'Accept emails ?'}) }}
</div>
{%- endif -%} {%- endif -%}
{%- if form.phonenumber is defined -%} {%- if form.phonenumber is defined -%}
{{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }} {{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }}
{%- endif -%} {%- endif -%}
{%- if form.mobilenumber is defined -%} {%- if form.mobilenumber is defined -%}
<div id="personPhoneNumber">
{{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }} {{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }}
</div>
<div id="personAcceptSMS">
{{ form_row(form.acceptSMS, {'label' : 'Accept short text message ?'}) }}
</div>
{%- endif -%}
{%- if form.otherPhoneNumbers is defined -%}
{{ form_widget(form.otherPhoneNumbers) }}
{{ form_errors(form.otherPhoneNumbers) }}
{%- endif -%} {%- endif -%}
{%- if form.contactInfo is defined -%} {%- if form.contactInfo is defined -%}
{{ form_row(form.contactInfo, {'label': 'Notes on contact information'}) }} {{ form_row(form.contactInfo, {'label': 'Notes on contact information'}) }}
@ -103,13 +136,11 @@
</li> </li>
</ul> </ul>
{{ form_end(form) }} {{ form_end(form) }}
</div>
{% endblock personcontent %} {% endblock personcontent %}
{% block js %} {% block js %}
<script type="text/javascript" src="{{ asset('build/person.js') }}"></script> <script type="text/javascript" src="{{ asset('build/person.js') }}"></script>
{% endblock js %} {% endblock js %}