From b4c22bf247d8ec92a3d589f1eb63c61d9629d9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 5 Jul 2018 14:02:14 +0200 Subject: [PATCH] add indeterminate gender --- Entity/Person.php | 1 + Form/Type/GenderType.php | 3 ++- Resources/translations/messages.fr.yml | 2 ++ Resources/views/layout.html.twig | 4 +++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Entity/Person.php b/Entity/Person.php index cf88be3bb..df33cb9e5 100644 --- a/Entity/Person.php +++ b/Entity/Person.php @@ -60,6 +60,7 @@ class Person implements HasCenterInterface { const MALE_GENDER = 'man'; const FEMALE_GENDER = 'woman'; + const BOTH_GENDER = 'both'; /** @var \Chill\PersonBundle\Entity\MaritalStatus The marital status of the person */ private $maritalStatus; diff --git a/Form/Type/GenderType.php b/Form/Type/GenderType.php index 10aac7c08..ad778d24a 100644 --- a/Form/Type/GenderType.php +++ b/Form/Type/GenderType.php @@ -23,7 +23,8 @@ class GenderType extends AbstractType { $a = array( Person::MALE_GENDER => Person::MALE_GENDER, - Person::FEMALE_GENDER => Person::FEMALE_GENDER + Person::FEMALE_GENDER => Person::FEMALE_GENDER, + Person::BOTH_GENDER => Person::BOTH_GENDER ); $resolver->setDefaults(array( diff --git a/Resources/translations/messages.fr.yml b/Resources/translations/messages.fr.yml index ec2ffc9e1..d8ecaba1c 100644 --- a/Resources/translations/messages.fr.yml +++ b/Resources/translations/messages.fr.yml @@ -47,6 +47,8 @@ man: Homme woman: Femme Man: Homme Woman: Femme +both: Indéterminé +Both: Indéterminé Divorced: Divorcé(e) Separated: Séparé(e) Widow: Veuf(ve) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index 235bfdc89..0d6bd372e 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -45,7 +45,9 @@