aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-03-09 08:59:08 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-03-20 21:12:22 +0100
commit0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc (patch)
tree4cf8b97ed3c06def270e9172c7b17c5c86048585 /src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php
parentd2b4f01d7435e8a8f99b15a2487916427c04e58d (diff)
downloadwallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.gz
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.tar.zst
wallabag-0d42217e4e8210dd2cf86f35ba9662ca02c8a2dc.zip
Convert english translation file
- convert english translation to translate key - remove baggy template for login (never used since user isn't logged in and it'll use the default theme: material) - fix tests about text in response (now checking translation key instead of translated text) - remove all ugly `<div class="hidden">{{ form_rest(form) }}</div>`
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php16
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 }