mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
[alt names] add alt names on person creation form
This commit is contained in:
@@ -39,11 +39,3 @@ services:
|
||||
- "%chill_person.validation.birtdate_not_before%"
|
||||
tags:
|
||||
- { name: validator.constraint_validator, alias: birthdate_not_before }
|
||||
|
||||
chill.main.form.person_creation:
|
||||
class: Chill\PersonBundle\Form\CreationPersonType
|
||||
arguments:
|
||||
- "@chill.main.form.data_transformer.center_transformer"
|
||||
tags:
|
||||
- { name: form.type, alias: chill_personbundle_person_creation }
|
||||
|
||||
|
@@ -1,11 +1,25 @@
|
||||
services:
|
||||
chill.person.form.person_creation:
|
||||
class: Chill\PersonBundle\Form\PersonType
|
||||
Chill\PersonBundle\Form\PersonType:
|
||||
arguments:
|
||||
- "%chill_person.person_fields%"
|
||||
- '%chill_person.person_fields%'
|
||||
- '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
chill.person.form.person_creation:
|
||||
alias: 'Chill\PersonBundle\Form\PersonType'
|
||||
deprecated: true
|
||||
|
||||
Chill\PersonBundle\Form\CreationPersonType:
|
||||
arguments:
|
||||
- '@chill.main.form.data_transformer.center_transformer'
|
||||
- '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
chill.main.form.person_creation:
|
||||
alias: 'Chill\PersonBundle\Form\CreationPersonType'
|
||||
deprecated: true
|
||||
|
||||
chill.person.accompanying_period_closing_motive:
|
||||
class: Chill\PersonBundle\Form\Type\ClosingMotiveType
|
||||
|
@@ -28,6 +28,10 @@
|
||||
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
|
||||
|
||||
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }}
|
||||
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
|
||||
{{ person }}{% spaceless %}
|
||||
{{ person|chill_entity_render_string }}{% spaceless %}
|
||||
{% if person.isOpen == false %}
|
||||
<i class="icon-lock"></i>
|
||||
{% endif %}
|
||||
@@ -65,11 +65,8 @@
|
||||
{{ form_start(form) }}
|
||||
<h2>{{ 'You will create this person'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'First name'|trans }}</dt>
|
||||
<dd>{{ firstName }}</dd>
|
||||
|
||||
<dt>{{ 'Last name'|trans }}</dt>
|
||||
<dd>{{ lastName }}</dd>
|
||||
<dt>{{ 'Name'|trans }}</dt>
|
||||
<dd>{{ person|chill_entity_render_string }}</dd>
|
||||
|
||||
<dt>{{ 'Date of birth'|trans }}</dt>
|
||||
<dd>{{ birthdate|localizeddate('long', 'none', app.request.locale)|default( 'Unknown date of birth'|trans ) }}</dd>
|
||||
@@ -79,6 +76,11 @@
|
||||
|
||||
<dt>{{ 'Creation date'|trans }}</dt>
|
||||
<dd>{{ creation_date|localizeddate('long', 'none', app.request.locale) }}</dd>
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{# mark as rendered #}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
|
Reference in New Issue
Block a user