diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 79f107575..384c743c2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -20,14 +20,10 @@ use Chill\MainBundle\Form\Type\PickCivilityType; use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\ThirdPartyBundle\Entity\ThirdParty; -use Chill\ThirdPartyBundle\Entity\ThirdPartyProfession; use Chill\ThirdPartyBundle\Form\Type\PickThirdPartyTypeCategoryType; use Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter; use Chill\ThirdPartyBundle\ThirdPartyType\ThirdPartyTypeManager; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\EntityRepository; -use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; @@ -111,17 +107,8 @@ class ThirdPartyType extends AbstractType 'placeholder' => 'thirdparty.choose civility', 'required' => false, ]) - ->add('profession', EntityType::class, [ + ->add('profession', TextType::class, [ 'label' => 'thirdparty.Profession', - 'class' => ThirdPartyProfession::class, - 'choice_label' => function (ThirdPartyProfession $profession): string { - return $this->translatableStringHelper->localize($profession->getName()); - }, - 'query_builder' => static function (EntityRepository $er): QueryBuilder { - return $er->createQueryBuilder('p') - ->where('p.active = true'); - }, - 'placeholder' => 'thirdparty.choose profession', 'required' => false, ]) ->add('contactDataAnonymous', CheckboxType::class, [