aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-03-09 08:59:08 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-03-20 21:12:22 +0100
commit0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc (patch)
tree4cf8b97ed3c06def270e9172c7b17c5c86048585 /src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
parentd2b4f01d7435e8a8f99b15a2487916427c04e58d (diff)
downloadwallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.gz
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.zst
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.zip
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 `<div class="hidden">{{ form_rest(form) }}</div>`
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php16
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