forked from wallabag/wallabag
Merge branch '2.6' into port/2.6.4-2.6.6
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
@ -6,6 +6,7 @@ use Lexik\Bundle\FormFilterBundle\Filter\FilterOperands;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\CheckboxFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\ChoiceFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\DateRangeFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\NumberRangeFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Form\Type\TextFilterType;
|
||||
use Lexik\Bundle\FormFilterBundle\Filter\Query\QueryInterface;
|
||||
@ -102,10 +103,13 @@ class EntryFilterType extends AbstractType
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
'label' => 'entry.filters.domain_label',
|
||||
'attr' => [
|
||||
'autocapitalize' => 'off',
|
||||
],
|
||||
])
|
||||
->add('httpStatus', TextFilterType::class, [
|
||||
->add('httpStatus', NumberFilterType::class, [
|
||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||
$value = $values['value'];
|
||||
$value = (int) $values['value'];
|
||||
if (false === \array_key_exists($value, Response::$statusTexts)) {
|
||||
return false;
|
||||
}
|
||||
@ -117,6 +121,11 @@ class EntryFilterType extends AbstractType
|
||||
return $filterQuery->createCondition($expression, $parameters);
|
||||
},
|
||||
'label' => 'entry.filters.http_status_label',
|
||||
'html5' => true,
|
||||
'attr' => [
|
||||
'min' => 100,
|
||||
'max' => 527,
|
||||
],
|
||||
])
|
||||
->add('isArchived', CheckboxFilterType::class, [
|
||||
'label' => 'entry.filters.archived_label',
|
||||
|
||||
Reference in New Issue
Block a user