mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
person: re-add accpet email and add possibility of hidding this field
This commit is contained in:
parent
c90f9ee5bc
commit
046f65f5ff
@ -82,6 +82,7 @@ class Configuration implements ConfigurationInterface
|
||||
->append($this->addFieldNode('accompanying_period'))
|
||||
->append($this->addFieldNode('memo'))
|
||||
->append($this->addFieldNode('number_of_children'))
|
||||
->append($this->addFieldNode('acceptEmail'))
|
||||
->arrayNode('alt_names')
|
||||
->defaultValue([])
|
||||
->arrayPrototype()
|
||||
|
@ -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
|
||||
|
@ -95,6 +95,11 @@
|
||||
<div id="personEmail">
|
||||
{{ form_row(form.email, {'label': 'Email'}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- if form.acceptEmail is defined -%}
|
||||
<div id="personAcceptEmail">
|
||||
{{ form_row(form.acceptEmail, {'label' : 'Accept emails ?'}) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if form.phonenumber is defined -%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user