X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FUserInformationType.php;h=07c9994968cee3a8c0122f21b02b0dedc0088831;hb=47e47841105a34c852744e207b4a0ea9e879ec49;hp=f52e409aced6acdf0b5d07520f97fdc354c9f353;hpb=619cc45359ead519b64129181a07e14160fbbfcb;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index f52e409a..07c99949 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php @@ -15,10 +15,19 @@ class UserInformationType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('name', TextType::class) - ->add('email', EmailType::class) - ->add('twoFactorAuthentication', CheckboxType::class, array('required' => false)) - ->add('save', SubmitType::class) + ->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') ; @@ -26,14 +35,14 @@ class UserInformationType extends AbstractType public function getParent() { - return 'fos_user_registration'; + return 'FOS\UserBundle\Form\Type\RegistrationFormType'; } public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults(array( + $resolver->setDefaults([ 'data_class' => 'Wallabag\UserBundle\Entity\User', - )); + ]); } public function getBlockPrefix()