diff options
Diffstat (limited to 'src/Wallabag')
3 files changed, 7 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index ffbe9ba2..d8bde17e 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |||
@@ -20,6 +20,9 @@ class NewUserType extends AbstractType | |||
20 | ->add('username', TextType::class, array('required' => true)) | 20 | ->add('username', TextType::class, array('required' => true)) |
21 | ->add('plainPassword', RepeatedType::class, array( | 21 | ->add('plainPassword', RepeatedType::class, array( |
22 | 'type' => PasswordType::class, | 22 | 'type' => PasswordType::class, |
23 | 'invalid_message' => 'The password fields must match', | ||
24 | 'first_options' => array('label' => 'Password'), | ||
25 | 'second_options' => array('label' => 'Repeat new password'), | ||
23 | 'constraints' => array( | 26 | 'constraints' => array( |
24 | new Constraints\Length(array( | 27 | new Constraints\Length(array( |
25 | 'min' => 8, | 28 | 'min' => 8, |
diff --git a/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml new file mode 100644 index 00000000..40513f2a --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/translations/validators.fr.yml | |||
@@ -0,0 +1,3 @@ | |||
1 | # Config screen | ||
2 | The password fields must match: 'Les deux mots de passe doivent être les mêmes' | ||
3 | Password should by at least 8 chars long: 'Le mot de passe doit contenir au moins 8 caractères' | ||
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php index c8807425..6c370a2d 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php | |||
@@ -293,7 +293,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
293 | 'new_user[plainPassword][second]' => 'mypassword2', | 293 | 'new_user[plainPassword][second]' => 'mypassword2', |
294 | 'new_user[email]' => 'wallace@wallace.me', | 294 | 'new_user[email]' => 'wallace@wallace.me', |
295 | ), | 295 | ), |
296 | 'This value is not valid', | 296 | 'The password fields must match', |
297 | ), | 297 | ), |
298 | ); | 298 | ); |
299 | } | 299 | } |