X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FUserInformationType.php;h=07c9994968cee3a8c0122f21b02b0dedc0088831;hb=f92fcb53ca78cc8822962e676b0db117e1a08aa5;hp=3d6df51017161c84bb6e244a86cc51d5565cefb4;hpb=98510a4189186c8dcc3f1bf38843d935ed3d1859;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index 3d6df510..07c99949 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -1,29 +1,51 @@ add('name', 'text') - ->add('email', 'email') - ->add('save', 'submit') + ->add('name', TextType::class, [ + 'label' => 'config.form_user.name_label', + ]) + ->add('email', EmailType::class, [ + 'label' => 'config.form_user.email_label', + ]) + ->add('twoFactorAuthentication', CheckboxType::class, [ + 'required' => false, + 'label' => 'config.form_user.twoFactorAuthentication_label', + ]) + ->add('save', SubmitType::class, [ + 'label' => 'config.form.save', + ]) + ->remove('username') + ->remove('plainPassword') ; } - public function setDefaultOptions(OptionsResolverInterface $resolver) + public function getParent() + { + return 'FOS\UserBundle\Form\Type\RegistrationFormType'; + } + + public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( - 'data_class' => 'Wallabag\CoreBundle\Entity\User', - )); + $resolver->setDefaults([ + 'data_class' => 'Wallabag\UserBundle\Entity\User', + ]); } - public function getName() + public function getBlockPrefix() { return 'update_user'; }