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

View File

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