X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FNewUserType.php;h=60fcc20c625c7d283eda3b4478ca103d33c59a17;hb=0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc;hp=6eb0e63f7f46cc2bbba2807c474a3083e80f0d3d;hpb=d2b4f01d7435e8a8f99b15a2487916427c04e58d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 6eb0e63f..60fcc20c 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -17,22 +17,30 @@ class NewUserType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('username', TextType::class, array('required' => true)) + ->add('username', TextType::class, array( + 'required' => true, + 'label' => 'config.form_new_user.username_label', + )) ->add('plainPassword', RepeatedType::class, array( 'type' => PasswordType::class, - 'invalid_message' => 'The password fields must match', - 'first_options' => array('label' => 'Password'), - 'second_options' => array('label' => 'Repeat new password'), + 'invalid_message' => 'validator.password_must_match', + 'first_options' => array('label' => 'config.form_new_user.password_label'), + 'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'), 'constraints' => array( new Constraints\Length(array( 'min' => 8, - 'minMessage' => 'Password should by at least 8 chars long', + 'minMessage' => 'validator.password_too_short', )), new Constraints\NotBlank(), ), + 'label' => 'config.form_new_user.plain_password_label', + )) + ->add('email', EmailType::class, array( + 'label' => 'config.form_new_user.email_label', + )) + ->add('save', SubmitType::class, array( + 'label' => 'config.form.save', )) - ->add('email', EmailType::class) - ->add('save', SubmitType::class) ; }