person: re-add accpet email and add possibility of hidding this field

This commit is contained in:
nobohan
2021-10-28 09:45:27 +02:00
parent c90f9ee5bc
commit 046f65f5ff
3 changed files with 11 additions and 0 deletions

View File

@@ -166,6 +166,11 @@ class PersonType extends AbstractType
->add('email', EmailType::class, array('required' => false));
}
if ($this->config['acceptEmail'] === 'visible') {
$builder
->add('acceptEmail', CheckboxType::class, array('required' => false));
}
if ($this->config['country_of_birth'] === 'visible') {
$builder->add('countryOfBirth', Select2CountryType::class, array(
'required' => false