thirdparty form: clean builder, and test if this kind input address

This commit is contained in:
Mathieu Jaumotte 2021-12-13 15:31:46 +01:00
parent 5526790d42
commit 985d8f0eae
2 changed files with 3 additions and 7 deletions

View File

@ -137,12 +137,6 @@ class ThirdPartyType extends AbstractType
->add('address', PickAddressType::class, [
'label' => 'Address',
])
->add('address2', PickAddressType::class, [
'label' => 'Address',
'use_valid_from' => true,
'use_valid_to' => true,
'mapped' => false,
])
->add('nameCompany', TextType::class, [
'label' => 'thirdparty.NameCompany',
'required' => false,

View File

@ -28,7 +28,9 @@
{{ form_widget(form.activeChildren) }}
{% endif %}
{{ form_row(form.address) }}
{% if thirdParty.kind != 'contact' and thirdParty.kind != 'child' %}
{{ form_row(form.address) }}
{% endif %}
{{ form_row(form.comment) }}