thirdparty: add address on kind = contact

This commit is contained in:
Mathieu Jaumotte 2021-12-14 14:57:11 +01:00
parent 3c1c07dc64
commit d3127bed6d
2 changed files with 4 additions and 4 deletions

View File

@ -134,9 +134,6 @@ class ThirdPartyType extends AbstractType
// Institutional ThirdParty (parent)
} else {
$builder
->add('address', PickAddressType::class, [
'label' => 'Address',
])
->add('nameCompany', TextType::class, [
'label' => 'thirdparty.NameCompany',
'required' => false,
@ -164,6 +161,9 @@ class ThirdPartyType extends AbstractType
if (ThirdParty::KIND_CHILD !== $options['kind']) {
$builder
->add('address', PickAddressType::class, [
'label' => 'Address',
])
->add('typesAndCategories', PickThirdPartyTypeCategoryType::class, [
'label' => 'thirdparty.Categories',
])

View File

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