From 5c895a7fd15822856fb407910264c5d95e1e223c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Dec 2015 13:00:37 +0100 Subject: Update bundle & stock file - update stock file (AppKernel, app.php, etc ..) from SymfonyStandard edition) - update bundle to latest release - remove security on profiler --- src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 2 +- src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 3 ++- src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 3 ++- src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Wallabag/CoreBundle/Form/Type') diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 615b8169..7d05a5d8 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php @@ -19,7 +19,7 @@ class ChangePasswordType extends AbstractType 'constraints' => new UserPassword(array('message' => 'Wrong value for your current password')), )) ->add('new_password', RepeatedType::class, array( - 'type' => 'password', + 'type' => PasswordType::class, 'invalid_message' => 'The password fields must match.', 'required' => true, 'first_options' => array('label' => 'New password'), diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 88082a04..a139f2df 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php @@ -36,7 +36,8 @@ class ConfigType extends AbstractType )) ->add('items_per_page') ->add('language', ChoiceType::class, array( - 'choices' => $this->languages, + 'choices' => array_flip($this->languages), + 'choices_as_values' => true, )) ->add('save', SubmitType::class) ; diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index e6fff976..ffbe9ba2 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php @@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\EmailType; +use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\RepeatedType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -18,7 +19,7 @@ class NewUserType extends AbstractType $builder ->add('username', TextType::class, array('required' => true)) ->add('plainPassword', RepeatedType::class, array( - 'type' => 'password', + 'type' => PasswordType::class, 'constraints' => array( new Constraints\Length(array( 'min' => 8, diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php index 296cec9e..5815b8c6 100644 --- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php @@ -19,7 +19,7 @@ class TaggingRuleType extends AbstractType ; $tagsField = $builder - ->create('tags', 'text') + ->create('tags', TextType::class) ->addModelTransformer(new StringToListTransformer(',')); $builder->add($tagsField); -- cgit v1.2.3