diff --git a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php index 69934cc70..0efcbe86a 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php @@ -64,9 +64,9 @@ class PersonDocumentType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { - // if (null !== $document = $options['data']) { - // $isScopeConcerned = $this->scopeResolverDispatcher->isConcerned($document); - // } + if (null !== $document = $options['data']) { + $isScopeConcerned = $this->scopeResolverDispatcher->isConcerned($document); + } $builder ->add('title', TextType::class) @@ -89,12 +89,13 @@ class PersonDocumentType extends AbstractType return $entity ? $this->translatableStringHelper->localize($entity->getName()) : ''; }, ]); - // if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) { - // $builder->add('scope', ScopePickerType::class, [ - // 'center' => $options['center'], - // 'role' => $options['role'], - // ]); - // } + + if ($isScopeConcerned && $this->parameterBag->get('chill_main')['acl']['form_show_scopes']) { + $builder->add('scope', ScopePickerType::class, [ + 'center' => $options['center'], + 'role' => $options['role'], + ]); + } } public function configureOptions(OptionsResolver $resolver)