aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-22 10:16:34 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-15 09:35:38 +0100
commit619cc45359ead519b64129181a07e14160fbbfcb (patch)
tree328691553a67be72a1156ff976036ed0ac7b85bb /src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
parent516022d60ea5c4e0c18a222590d23190a2c7765f (diff)
downloadwallabag-619cc45359ead519b64129181a07e14160fbbfcb.tar.gz
wallabag-619cc45359ead519b64129181a07e14160fbbfcb.tar.zst
wallabag-619cc45359ead519b64129181a07e14160fbbfcb.zip
Symfony Upgrade Fixer FTW
symfony-upgrade-fixer fix src/Wallabag/
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
index 82e1954d..615b8169 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php
@@ -3,6 +3,9 @@
3namespace Wallabag\CoreBundle\Form\Type; 3namespace Wallabag\CoreBundle\Form\Type;
4 4
5use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\PasswordType;
7use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
8use Symfony\Component\Form\Extension\Core\Type\SubmitType;
6use Symfony\Component\Form\FormBuilderInterface; 9use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; 10use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
8use Symfony\Component\Validator\Constraints; 11use Symfony\Component\Validator\Constraints;
@@ -12,10 +15,10 @@ class ChangePasswordType extends AbstractType
12 public function buildForm(FormBuilderInterface $builder, array $options) 15 public function buildForm(FormBuilderInterface $builder, array $options)
13 { 16 {
14 $builder 17 $builder
15 ->add('old_password', 'password', array( 18 ->add('old_password', PasswordType::class, array(
16 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), 19 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')),
17 )) 20 ))
18 ->add('new_password', 'repeated', array( 21 ->add('new_password', RepeatedType::class, array(
19 'type' => 'password', 22 'type' => 'password',
20 'invalid_message' => 'The password fields must match.', 23 'invalid_message' => 'The password fields must match.',
21 'required' => true, 24 'required' => true,
@@ -29,11 +32,11 @@ class ChangePasswordType extends AbstractType
29 new Constraints\NotBlank(), 32 new Constraints\NotBlank(),
30 ), 33 ),
31 )) 34 ))
32 ->add('save', 'submit') 35 ->add('save', SubmitType::class)
33 ; 36 ;
34 } 37 }
35 38
36 public function getName() 39 public function getBlockPrefix()
37 { 40 {
38 return 'change_passwd'; 41 return 'change_passwd';
39 } 42 }