diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-03-21 12:47:57 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-03-21 12:47:57 +0100 |
commit | 439b36323e37f669b056cc5228c44bb91196256c (patch) | |
tree | ecd84477adf3e12819b26aff2a6d2e644e45ea72 /src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | |
parent | bd46de6b25f982e1a0d3f975971fe8014db13833 (diff) | |
parent | 4083887afe4dd3f568b2dfea3392506b554c79b8 (diff) | |
download | wallabag-439b36323e37f669b056cc5228c44bb91196256c.tar.gz wallabag-439b36323e37f669b056cc5228c44bb91196256c.tar.zst wallabag-439b36323e37f669b056cc5228c44bb91196256c.zip |
Merge pull request #1774 from wallabag/v2-key-translation
Switch to keys in translated files
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 | } |