mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix canonicalization and show only active children in form
This commit is contained in:
@@ -16,6 +16,7 @@ use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\Form\FormView;
|
||||
@@ -138,6 +139,10 @@ class ThirdPartyType extends AbstractType
|
||||
'placeholder' => 'thirdparty.choose profession',
|
||||
'required' => false
|
||||
])
|
||||
->add('contactDataAnonymous', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'thirdparty.Contact data are confidential'
|
||||
])
|
||||
;
|
||||
|
||||
// Institutional ThirdParty (parent)
|
||||
@@ -165,12 +170,13 @@ class ThirdPartyType extends AbstractType
|
||||
'multiple' => true,
|
||||
'attr' => ['class' => 'select2']
|
||||
])
|
||||
->add('children', ChillCollectionType::class, [
|
||||
->add('activeChildren', ChillCollectionType::class, [
|
||||
'entry_type' => ThirdPartyType::class,
|
||||
'entry_options' => [
|
||||
'is_child' => true,
|
||||
'block_name' => 'children'
|
||||
],
|
||||
'block_name' => 'active_children',
|
||||
'allow_add' => true,
|
||||
'allow_delete' => true,
|
||||
'by_reference' => false,
|
||||
|
Reference in New Issue
Block a user