person: create a new person: add a civility field

This commit is contained in:
nobohan 2022-04-14 17:08:44 +02:00
parent 617473f6a5
commit c1ec2933e5
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,7 @@ use Chill\MainBundle\Form\Event\CustomizeFormEvent;
use Chill\MainBundle\Form\Type\ChillDateType;
use Chill\MainBundle\Form\Type\ChillPhoneNumberType;
use Chill\MainBundle\Form\Type\PickCenterType;
use Chill\MainBundle\Form\Type\PickCivilityType;
use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Form\Type\GenderType;
@ -55,6 +56,11 @@ final class CreationPersonType extends AbstractType
$builder
->add('firstName')
->add('lastName')
->add('civility', PickCivilityType::class, [
'required' => false,
'label' => 'Civility',
'placeholder' => 'choose civility',
])
->add('gender', GenderType::class, [
'required' => true, 'placeholder' => null,
])

View File

@ -93,6 +93,8 @@
{{ 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 }) }}