]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/UserInformationType.php
Merge remote-tracking branch 'origin/master' into 2.4
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / UserInformationType.php
index 799ea39e6871e478f39fa2ed3c2b6328907f103f..6e4c9154c5777a39b6ddd65153f507f54f90ddd2 100644 (file)
@@ -15,19 +15,24 @@ class UserInformationType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('name', TextType::class, array(
+            ->add('name', TextType::class, [
                 'label' => 'config.form_user.name_label',
-            ))
-            ->add('email', EmailType::class, array(
+            ])
+            ->add('email', EmailType::class, [
                 'label' => 'config.form_user.email_label',
-            ))
-            ->add('twoFactorAuthentication', CheckboxType::class, array(
+            ])
+            ->add('emailTwoFactor', CheckboxType::class, [
                 'required' => false,
-                'label' => 'config.form_user.twoFactorAuthentication_label',
-            ))
-            ->add('save', SubmitType::class, array(
+                'label' => 'config.form_user.emailTwoFactor_label',
+            ])
+            ->add('googleTwoFactor', CheckboxType::class, [
+                'required' => false,
+                'label' => 'config.form_user.googleTwoFactor_label',
+                'mapped' => false,
+            ])
+            ->add('save', SubmitType::class, [
                 'label' => 'config.form.save',
-            ))
+            ])
             ->remove('username')
             ->remove('plainPassword')
         ;
@@ -40,9 +45,9 @@ class UserInformationType extends AbstractType
 
     public function configureOptions(OptionsResolver $resolver)
     {
-        $resolver->setDefaults(array(
+        $resolver->setDefaults([
             'data_class' => 'Wallabag\UserBundle\Entity\User',
-        ));
+        ]);
     }
 
     public function getBlockPrefix()