diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 7d05a5d8..841af51e 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | |||
@@ -16,23 +16,27 @@ class ChangePasswordType extends AbstractType | |||
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('old_password', PasswordType::class, array( | 18 | ->add('old_password', PasswordType::class, array( |
19 | 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), | 19 | 'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')), |
20 | 'label' => 'config.form_password.old_password_label', | ||
20 | )) | 21 | )) |
21 | ->add('new_password', RepeatedType::class, array( | 22 | ->add('new_password', RepeatedType::class, array( |
22 | 'type' => PasswordType::class, | 23 | 'type' => PasswordType::class, |
23 | 'invalid_message' => 'The password fields must match.', | 24 | 'invalid_message' => 'validator.password_must_match', |
24 | 'required' => true, | 25 | 'required' => true, |
25 | 'first_options' => array('label' => 'New password'), | 26 | 'first_options' => array('label' => 'config.form_password.new_password_label'), |
26 | 'second_options' => array('label' => 'Repeat new password'), | 27 | 'second_options' => array('label' => 'config.form_password.repeat_new_password_label'), |
27 | 'constraints' => array( | 28 | 'constraints' => array( |
28 | new Constraints\Length(array( | 29 | new Constraints\Length(array( |
29 | 'min' => 8, | 30 | 'min' => 8, |
30 | 'minMessage' => 'Password should by at least 8 chars long', | 31 | 'minMessage' => 'validator.password_too_short', |
31 | )), | 32 | )), |
32 | new Constraints\NotBlank(), | 33 | new Constraints\NotBlank(), |
33 | ), | 34 | ), |
35 | 'label' => 'config.form_password.new_password_label', | ||
36 | )) | ||
37 | ->add('save', SubmitType::class, array( | ||
38 | 'label' => 'config.form.save', | ||
34 | )) | 39 | )) |
35 | ->add('save', SubmitType::class) | ||
36 | ; | 40 | ; |
37 | } | 41 | } |
38 | 42 | ||