diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-15 15:38:31 +0100 |
commit | 1930c19d8214c05ceefac5ac011a6b6e7e4a983d (patch) | |
tree | 8f07ffa139c7c2e883a560ef7dbb35a76adfb8dd /src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | |
parent | 790573d45899504bdecd2573c8f64018e23b139e (diff) | |
parent | 131eaa3e94ace8d75d6218e5c7c3aa58d5bb5009 (diff) | |
download | wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.gz wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.tar.zst wallabag-1930c19d8214c05ceefac5ac011a6b6e7e4a983d.zip |
Merge pull request #1524 from wallabag/sf2.8
Upgrade to Symfony 3.0
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/UserInformationType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | 16 |
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 @@ | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | 3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | 10 | use Symfony\Component\Form\FormBuilderInterface; |
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | 11 | use 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 | } |