]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
Convert english translation file
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / UserInformationType.php
index 84f020131908fb8038da4cd3a05a72aad9d0476d..799ea39e6871e478f39fa2ed3c2b6328907f103f 100644 (file)
@@ -3,6 +3,10 @@
 namespace Wallabag\CoreBundle\Form\Type;
 
 use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
+use Symfony\Component\Form\Extension\Core\Type\EmailType;
+use Symfony\Component\Form\Extension\Core\Type\SubmitType;
+use Symfony\Component\Form\Extension\Core\Type\TextType;
 use Symfony\Component\Form\FormBuilderInterface;
 use Symfony\Component\OptionsResolver\OptionsResolver;
 
@@ -11,9 +15,19 @@ class UserInformationType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('name', 'text')
-            ->add('email', 'email')
-            ->add('save', 'submit')
+            ->add('name', TextType::class, array(
+                'label' => 'config.form_user.name_label',
+            ))
+            ->add('email', EmailType::class, array(
+                'label' => 'config.form_user.email_label',
+            ))
+            ->add('twoFactorAuthentication', CheckboxType::class, array(
+                'required' => false,
+                'label' => 'config.form_user.twoFactorAuthentication_label',
+            ))
+            ->add('save', SubmitType::class, array(
+                'label' => 'config.form.save',
+            ))
             ->remove('username')
             ->remove('plainPassword')
         ;
@@ -21,7 +35,7 @@ class UserInformationType extends AbstractType
 
     public function getParent()
     {
-        return 'fos_user_registration';
+        return 'FOS\UserBundle\Form\Type\RegistrationFormType';
     }
 
     public function configureOptions(OptionsResolver $resolver)
@@ -31,7 +45,7 @@ class UserInformationType extends AbstractType
         ));
     }
 
-    public function getName()
+    public function getBlockPrefix()
     {
         return 'update_user';
     }