X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FEntrySortType.php;fp=src%2FWallabag%2FCoreBundle%2FForm%2FType%2FEntrySortType.php;h=ac251c5b95fad51d57bb2ba0df26b7846bb55aa5;hb=9b5552290445b404e6de0595d7d27a2de824230a;hp=2555f68dea4db3c29ab27e9a7211c5d012321886;hpb=19c407f2967786bb106ebae636055b30af900e7b;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php b/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php index 2555f68d..ac251c5b 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntrySortType.php @@ -2,8 +2,6 @@ namespace Wallabag\CoreBundle\Form\Type; -use Doctrine\ORM\EntityRepository; -use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType; use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -26,12 +24,20 @@ class EntrySortType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('sortOrder', CheckboxFilterType::class) + ->add('sortOrder', ChoiceFilterType::class, [ + 'choices' => [ + 'entry.sort.ascending' => 'asc', + 'entry.sort.descending' => 'desc', + ], + 'label' => 'entry.sort.order_label', + ]) ->add('sortType', ChoiceFilterType::class, [ 'choices' => [ - 'createdAt' => 'createdAt', - 'title' => 'title', - 'updatedAt' => 'updatedAt', + 'entry.sort.by.creation_date' => 'createdAt', + 'entry.sort.by.starred_date' => 'starredAt', + 'entry.sort.by.archive_date' => 'archivedAt', + 'entry.sort.by.title' => 'title', + 'entry.sort.by.last_updated' => 'updatedAt', ], 'label' => 'entry.sort.status_label', ])