From 0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Wed, 9 Mar 2016 08:59:08 +0100 Subject: Convert english translation file - convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `` --- src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php') 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 { $builder ->add('old_password', PasswordType::class, array( - 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), + 'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')), + 'label' => 'config.form_password.old_password_label', )) ->add('new_password', RepeatedType::class, array( 'type' => PasswordType::class, - 'invalid_message' => 'The password fields must match.', + 'invalid_message' => 'validator.password_must_match', 'required' => true, - 'first_options' => array('label' => 'New password'), - 'second_options' => array('label' => 'Repeat new password'), + 'first_options' => array('label' => 'config.form_password.new_password_label'), + 'second_options' => array('label' => 'config.form_password.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_password.new_password_label', + )) + ->add('save', SubmitType::class, array( + 'label' => 'config.form.save', )) - ->add('save', SubmitType::class) ; } -- cgit v1.2.3