diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-04-27 15:58:32 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2017-05-02 15:28:39 +0200 |
commit | c37515f880bd05b86e3e848cc184018295ec1920 (patch) | |
tree | c64785ee1bce798fe05d6b06e63abff0a41ffcea /src/Wallabag/UserBundle/Form | |
parent | e1d64050ad6f54e45d3954ffac21daaee58c6240 (diff) | |
download | wallabag-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.php | 29 |
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 | |||
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 | } | ||