mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
person: add show hide on some fields + remove unknown genderType
This commit is contained in:
@@ -127,7 +127,7 @@ class PersonType extends AbstractType
|
||||
->add('mobilenumber', TelType::class, array('required' => false))
|
||||
->add('acceptSMS', CheckboxType::class, array(
|
||||
'value' => false,
|
||||
'required' => true //TODO required only if mobilenumber is filled
|
||||
'required' => true
|
||||
));
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ class PersonType extends AbstractType
|
||||
if ($this->config['email'] === 'visible') {
|
||||
$builder
|
||||
->add('email', EmailType::class, array('required' => false))
|
||||
->add('acceptEmail', CheckboxType::class, array('required' => false));//TODO visible only if email is filled
|
||||
->add('acceptEmail', CheckboxType::class, array('required' => false));
|
||||
}
|
||||
|
||||
if ($this->config['country_of_birth'] === 'visible') {
|
||||
|
@@ -24,8 +24,7 @@ class GenderType extends AbstractType {
|
||||
$a = array(
|
||||
Person::MALE_GENDER => Person::MALE_GENDER,
|
||||
Person::FEMALE_GENDER => Person::FEMALE_GENDER,
|
||||
Person::BOTH_GENDER => Person::BOTH_GENDER,
|
||||
Person::NO_INFORMATION => Person::NO_INFORMATION
|
||||
Person::BOTH_GENDER => Person::BOTH_GENDER
|
||||
);
|
||||
|
||||
$resolver->setDefaults(array(
|
||||
|
Reference in New Issue
Block a user