]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/UserBundle/Form/NewUserType.php
Added group in user form
[github/wallabag/wallabag.git] / src / Wallabag / UserBundle / Form / NewUserType.php
index ad5a2405924ae8b6211f9ac4c6928e7f7d31e385..ee8324d75b3b0b2b4fc99ac09ca6860a69739c69 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace Wallabag\UserBundle\Form;
 
+use Symfony\Bridge\Doctrine\Form\Type\EntityType;
 use Symfony\Component\Form\AbstractType;
 use Symfony\Component\Form\Extension\Core\Type\EmailType;
 use Symfony\Component\Form\Extension\Core\Type\PasswordType;
@@ -38,6 +39,12 @@ class NewUserType extends AbstractType
             ->add('email', EmailType::class, [
                 'label' => 'user.form.email_label',
             ])
+            ->add('groups', EntityType::class, array(
+                'class' => 'WallabagGroupBundle:Group',
+                'choice_label' => 'name',
+                'multiple' => true,
+                'expanded' => true,
+            ))
             ->add('save', SubmitType::class, [
                 'label' => 'user.form.save',
             ])