diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-23 11:09:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 11:09:17 +0200 |
commit | 1953a872932a63792293b4aec087880265ba89f7 (patch) | |
tree | fd16599e737fcdaf193c933ef3ec4a4ee248b117 /src/Wallabag/UserBundle/Form | |
parent | d83d25dadec2c38460a32d96f5d2903426fec9d3 (diff) | |
parent | 702f2d67d60ca963492b90dad74cb5f8dcc84e51 (diff) | |
download | wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.gz wallabag-1953a872932a63792293b4aec087880265ba89f7.tar.zst wallabag-1953a872932a63792293b4aec087880265ba89f7.zip |
Merge pull request #3011 from wallabag/2.3
wallabag 2.3.0
Diffstat (limited to 'src/Wallabag/UserBundle/Form')
-rw-r--r-- | src/Wallabag/UserBundle/Form/SearchUserType.php | 29 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/Form/UserType.php | 10 |
2 files changed, 34 insertions, 5 deletions
diff --git a/src/Wallabag/UserBundle/Form/SearchUserType.php b/src/Wallabag/UserBundle/Form/SearchUserType.php new file mode 100644 index 00000000..9ce46ee1 --- /dev/null +++ b/src/Wallabag/UserBundle/Form/SearchUserType.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Form; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
7 | use Symfony\Component\Form\FormBuilderInterface; | ||
8 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
9 | |||
10 | class SearchUserType extends AbstractType | ||
11 | { | ||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
13 | { | ||
14 | $builder | ||
15 | ->setMethod('GET') | ||
16 | ->add('term', TextType::class, [ | ||
17 | 'required' => true, | ||
18 | 'label' => 'user.new.form_search.term_label', | ||
19 | ]) | ||
20 | ; | ||
21 | } | ||
22 | |||
23 | public function configureOptions(OptionsResolver $resolver) | ||
24 | { | ||
25 | $resolver->setDefaults([ | ||
26 | 'csrf_protection' => false, | ||
27 | ]); | ||
28 | } | ||
29 | } | ||
diff --git a/src/Wallabag/UserBundle/Form/UserType.php b/src/Wallabag/UserBundle/Form/UserType.php index d8cdbaf9..56fea640 100644 --- a/src/Wallabag/UserBundle/Form/UserType.php +++ b/src/Wallabag/UserBundle/Form/UserType.php | |||
@@ -3,12 +3,12 @@ | |||
3 | namespace Wallabag\UserBundle\Form; | 3 | namespace Wallabag\UserBundle\Form; |
4 | 4 | ||
5 | use Symfony\Component\Form\AbstractType; | 5 | use Symfony\Component\Form\AbstractType; |
6 | use Symfony\Component\Form\FormBuilderInterface; | ||
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
8 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | 6 | use Symfony\Component\Form\Extension\Core\Type\CheckboxType; |
7 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
9 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | 8 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
10 | use Symfony\Component\Form\Extension\Core\Type\TextType; | 9 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
11 | use Symfony\Component\Form\Extension\Core\Type\EmailType; | 10 | use Symfony\Component\Form\FormBuilderInterface; |
11 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
12 | 12 | ||
13 | class UserType extends AbstractType | 13 | class UserType extends AbstractType |
14 | { | 14 | { |
@@ -50,8 +50,8 @@ class UserType extends AbstractType | |||
50 | */ | 50 | */ |
51 | public function configureOptions(OptionsResolver $resolver) | 51 | public function configureOptions(OptionsResolver $resolver) |
52 | { | 52 | { |
53 | $resolver->setDefaults(array( | 53 | $resolver->setDefaults([ |
54 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | 54 | 'data_class' => 'Wallabag\UserBundle\Entity\User', |
55 | )); | 55 | ]); |
56 | } | 56 | } |
57 | } | 57 | } |