aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Form
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-04-27 15:58:32 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-05-02 15:28:39 +0200
commitc37515f880bd05b86e3e848cc184018295ec1920 (patch)
treec64785ee1bce798fe05d6b06e63abff0a41ffcea /src/Wallabag/UserBundle/Form
parente1d64050ad6f54e45d3954ffac21daaee58c6240 (diff)
downloadwallabag-c37515f880bd05b86e3e848cc184018295ec1920.tar.gz
wallabag-c37515f880bd05b86e3e848cc184018295ec1920.tar.zst
wallabag-c37515f880bd05b86e3e848cc184018295ec1920.zip
Add filter to users management page
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/UserBundle/Form')
-rw-r--r--src/Wallabag/UserBundle/Form/SearchUserType.php29
1 files changed, 29 insertions, 0 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
3namespace Wallabag\UserBundle\Form;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\TextType;
7use Symfony\Component\Form\FormBuilderInterface;
8use Symfony\Component\OptionsResolver\OptionsResolver;
9
10class 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}