mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
Change PickGenderType form field to use in Person creation form
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Chill\MainBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Entity\Gender;
|
||||
use Chill\MainBundle\Entity\GenderEnum;
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
@@ -20,11 +21,11 @@ class GenderType extends AbstractType
|
||||
'required' => true,
|
||||
])
|
||||
->add('icon', TextType::class)
|
||||
->add('isGrammatical', ChoiceType::class, [
|
||||
'choices' => [
|
||||
'Grammatical' => true,
|
||||
'Not grammatical' => false,
|
||||
],
|
||||
->add('genderTranslation', ChoiceType::class, [
|
||||
'choices' => GenderEnum::cases(),
|
||||
'choice_label' => fn(GenderEnum $enum) => ucfirst(strtolower($enum->name)),
|
||||
'choice_value' => fn(?GenderEnum $enum) => $enum ? $enum->value : null,
|
||||
'data_class' => null,
|
||||
])
|
||||
->add('active', ChoiceType::class, [
|
||||
'choices' => [
|
||||
|
Reference in New Issue
Block a user