aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
index 841af51e..81c4a616 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
@@ -15,28 +15,28 @@ class ChangePasswordType extends AbstractType
15 public function buildForm(FormBuilderInterface $builder, array $options) 15 public function buildForm(FormBuilderInterface $builder, array $options)
16 { 16 {
17 $builder 17 $builder
18 ->add('old_password', PasswordType::class, array( 18 ->add('old_password', PasswordType::class, [
19 'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')), 19 'constraints' => new UserPassword(['message' => 'validator.password_wrong_value']),
20 'label' => 'config.form_password.old_password_label', 20 'label' => 'config.form_password.old_password_label',
21 )) 21 ])
22 ->add('new_password', RepeatedType::class, array( 22 ->add('new_password', RepeatedType::class, [
23 'type' => PasswordType::class, 23 'type' => PasswordType::class,
24 'invalid_message' => 'validator.password_must_match', 24 'invalid_message' => 'validator.password_must_match',
25 'required' => true, 25 'required' => true,
26 'first_options' => array('label' => 'config.form_password.new_password_label'), 26 'first_options' => ['label' => 'config.form_password.new_password_label'],
27 'second_options' => array('label' => 'config.form_password.repeat_new_password_label'), 27 'second_options' => ['label' => 'config.form_password.repeat_new_password_label'],
28 'constraints' => array( 28 'constraints' => [
29 new Constraints\Length(array( 29 new Constraints\Length([
30 'min' => 8, 30 'min' => 8,
31 'minMessage' => 'validator.password_too_short', 31 'minMessage' => 'validator.password_too_short',
32 )), 32 ]),
33 new Constraints\NotBlank(), 33 new Constraints\NotBlank(),
34 ), 34 ],
35 'label' => 'config.form_password.new_password_label', 35 'label' => 'config.form_password.new_password_label',
36 )) 36 ])
37 ->add('save', SubmitType::class, array( 37 ->add('save', SubmitType::class, [
38 'label' => 'config.form.save', 38 'label' => 'config.form.save',
39 )) 39 ])
40 ; 40 ;
41 } 41 }
42 42