diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index ee10bc8b..ec36503b 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | |||
@@ -34,7 +34,9 @@ class EntryFilterType extends AbstractType | |||
34 | public function buildForm(FormBuilderInterface $builder, array $options) | 34 | public function buildForm(FormBuilderInterface $builder, array $options) |
35 | { | 35 | { |
36 | $builder | 36 | $builder |
37 | ->add('readingTime', NumberRangeFilterType::class) | 37 | ->add('readingTime', NumberRangeFilterType::class, array( |
38 | 'label' => 'entry.filters.reading_time.label', | ||
39 | )) | ||
38 | ->add('createdAt', DateRangeFilterType::class, array( | 40 | ->add('createdAt', DateRangeFilterType::class, array( |
39 | 'left_date_options' => array( | 41 | 'left_date_options' => array( |
40 | 'attr' => array( | 42 | 'attr' => array( |
@@ -50,6 +52,7 @@ class EntryFilterType extends AbstractType | |||
50 | 'format' => 'dd/MM/yyyy', | 52 | 'format' => 'dd/MM/yyyy', |
51 | 'widget' => 'single_text', | 53 | 'widget' => 'single_text', |
52 | ), | 54 | ), |
55 | 'label' => 'entry.filters.created_at.label', | ||
53 | ) | 56 | ) |
54 | ) | 57 | ) |
55 | ->add('domainName', TextFilterType::class, array( | 58 | ->add('domainName', TextFilterType::class, array( |
@@ -62,9 +65,14 @@ class EntryFilterType extends AbstractType | |||
62 | 65 | ||
63 | return $filterQuery->createCondition($expression); | 66 | return $filterQuery->createCondition($expression); |
64 | }, | 67 | }, |
68 | 'label' => 'entry.filters.domain_label', | ||
69 | )) | ||
70 | ->add('isArchived', CheckboxFilterType::class, array( | ||
71 | 'label' => 'entry.filters.archived_label', | ||
72 | )) | ||
73 | ->add('isStarred', CheckboxFilterType::class, array( | ||
74 | 'label' => 'entry.filters.starred_label', | ||
65 | )) | 75 | )) |
66 | ->add('isArchived', CheckboxFilterType::class) | ||
67 | ->add('isStarred', CheckboxFilterType::class) | ||
68 | ->add('previewPicture', CheckboxFilterType::class, array( | 76 | ->add('previewPicture', CheckboxFilterType::class, array( |
69 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 77 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
70 | if (false === $values['value']) { | 78 | if (false === $values['value']) { |
@@ -75,10 +83,12 @@ class EntryFilterType extends AbstractType | |||
75 | 83 | ||
76 | return $filterQuery->createCondition($expression); | 84 | return $filterQuery->createCondition($expression); |
77 | }, | 85 | }, |
86 | 'label' => 'entry.filters.preview_picture_label', | ||
78 | )) | 87 | )) |
79 | ->add('language', ChoiceFilterType::class, array( | 88 | ->add('language', ChoiceFilterType::class, array( |
80 | 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), | 89 | 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), |
81 | 'choices_as_values' => true, | 90 | 'choices_as_values' => true, |
91 | 'label' => 'entry.filters.language_label', | ||
82 | )) | 92 | )) |
83 | ; | 93 | ; |
84 | } | 94 | } |