{# * Copyright (C) 2014, Champs Libres Cooperative SCRLFS, * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . #} {% extends "@ChillMain/layout.html.twig" %} {% block title %}{{ 'Add a person'|trans }}{% endblock title %} {% block content %}

{{ 'Add a person'|trans }}

{% if alternatePersons is not empty %}
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %} %nb% person with similar name. Please verify that this is a new person {% endtranschoice %}
{% for person in alternatePersons %} {% endfor %}
{{ 'Name'|trans }} {{ 'Date of birth'|trans }} {{ 'Nationality'|trans }}
{{ person|chill_entity_render_string }}{% apply spaceless %} {% if person.isOpen == false %} {% endif %} {% endapply %} {% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %} {% endif %} {% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
{% endif %} {{ form_start(form, {'attr' : {'id' : 'create-form'}}) }}
{{ form_label(form.lastName, 'Last name'|trans) }}
{{ form_widget(form.lastName, {'attr': {'data-suggest-transform': 'uppercase_all' } }) }}
{{ form_label(form.firstName, 'First name'|trans) }}
{{ form_widget(form.firstName, {'attr': {'data-suggest-transform': 'uppercase_first_letter' } }) }}
{% if form.altNames is defined %} {% for altName in form.altNames %}
{{ form_label(altName) }}
{{ form_widget(altName, {'attr': {'data-suggest-transform': 'uppercase_all' } }) }}
{% endfor %} {% endif %} {{ form_row(form.gender, { 'label' : 'Gender'|trans }) }} {{ form_row(form.civility, { 'label' : 'Civility'|trans }) }} {{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }} {{ form_row(form.phonenumber, { 'label' : 'Phonenumber'|trans }) }} {{ form_row(form.mobilenumber, { 'label' : 'Mobilenumber'|trans }) }} {{ form_row(form.email, { 'label' : 'Email'|trans }) }} {% if form.center is defined %} {{ form_row(form.center) }} {% endif %}
{{ form_row(form.addressForm) }}
{{ form_row(form.address) }}
{{ form_end(form) }}
{% endblock content %} {% block js %} {{ encore_entry_script_tags('page_suggest_names') }} {{ encore_entry_script_tags('page_create_person') }} {{ encore_entry_script_tags('mod_input_address') }} {% endblock js %} {% block css %} {{ encore_entry_link_tags('mod_input_address') }} {% endblock %}