aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/UserInformationType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/UserInformationType.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
index e06c937d..f491b0ae 100644
--- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
@@ -3,6 +3,10 @@
3namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
4 4
5use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
7use Symfony\Component\Form\Extension\Core\Type\EmailType;
8use Symfony\Component\Form\Extension\Core\Type\SubmitType;
9use Symfony\Component\Form\Extension\Core\Type\TextType;
6use Symfony\Component\Form\FormBuilderInterface; 10use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\OptionsResolver\OptionsResolver; 11use Symfony\Component\OptionsResolver\OptionsResolver;
8 12
@@ -11,10 +15,10 @@ class UserInformationType extends AbstractType
11 public function buildForm(FormBuilderInterface $builder, array $options) 15 public function buildForm(FormBuilderInterface $builder, array $options)
12 { 16 {
13 $builder 17 $builder
14 ->add('name', 'text') 18 ->add('name', TextType::class)
15 ->add('email', 'email') 19 ->add('email', EmailType::class)
16 ->add('twoFactorAuthentication', 'checkbox', array('required' => false)) 20 ->add('twoFactorAuthentication', CheckboxType::class, array('required' => false))
17 ->add('save', 'submit') 21 ->add('save', SubmitType::class)
18 ->remove('username') 22 ->remove('username')
19 ->remove('plainPassword') 23 ->remove('plainPassword')
20 ; 24 ;
@@ -22,7 +26,7 @@ class UserInformationType extends AbstractType
22 26
23 public function getParent() 27 public function getParent()
24 { 28 {
25 return 'fos_user_registration'; 29 return 'FOS\UserBundle\Form\Type\RegistrationFormType';
26 } 30 }
27 31
28 public function configureOptions(OptionsResolver $resolver) 32 public function configureOptions(OptionsResolver $resolver)
@@ -32,7 +36,7 @@ class UserInformationType extends AbstractType
32 )); 36 ));
33 } 37 }
34 38
35 public function getName() 39 public function getBlockPrefix()
36 { 40 {
37 return 'update_user'; 41 return 'update_user';
38 } 42 }