|
@@ -3,8 +3,6 @@
|
|
|
namespace AppBundle\Form;
|
|
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
|
-use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
|
|
-use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
|
|
|
@@ -16,37 +14,14 @@ class UserEditType extends AbstractType
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
|
{
|
|
|
$builder
|
|
|
- ->add('username')
|
|
|
- ->add('roles', ChoiceType::class, array(
|
|
|
- 'choices' => array (
|
|
|
- 'Administrateur' => 'ROLE_ADMIN',
|
|
|
- 'User' => 'ROLE_USER',
|
|
|
- 'Modérateur' => 'ROLE_MODERATEUR',
|
|
|
- 'Super Admin' => 'ROLE_SUPER_ADMIN'
|
|
|
- ),
|
|
|
- 'multiple' => true
|
|
|
- ))
|
|
|
- ->add('save', SubmitType::class, array('label' => 'Enregistrer'));
|
|
|
-
|
|
|
+ ->remove('password');
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * {@inheritdoc}
|
|
|
- */
|
|
|
- public function configureOptions(OptionsResolver $resolver)
|
|
|
+ public function getParent()
|
|
|
{
|
|
|
- $resolver->setDefaults(array(
|
|
|
- 'data_class' => 'AppBundle\Entity\User'
|
|
|
- ));
|
|
|
+ return UserType::class;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * {@inheritdoc}
|
|
|
- */
|
|
|
- public function getBlockPrefix()
|
|
|
- {
|
|
|
- return 'appbundle_user';
|
|
|
- }
|
|
|
|
|
|
|
|
|
}
|