diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 29069c67d..4146e98a3 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -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', ]) diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig index 6b3133fd5..6b76b5cb0 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/_form.html.twig @@ -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 %}