diff --git a/src/Form/Filters/Constraints/DateTimeConstraintType.php b/src/Form/Filters/Constraints/DateTimeConstraintType.php index 9cc805b6..6ac4e177 100644 --- a/src/Form/Filters/Constraints/DateTimeConstraintType.php +++ b/src/Form/Filters/Constraints/DateTimeConstraintType.php @@ -37,7 +37,7 @@ class DateTimeConstraintType extends AbstractType '>' => '>', '<=' => '<=', '>=' => '>=', - 'BETWEEN' => 'BETWEEN', + 'filter.number_constraint.value.operator.BETWEEN' => 'BETWEEN', ]; $builder->add('value1', DateTimeType::class, array_merge_recursive([ diff --git a/src/Form/Filters/Constraints/NumberConstraintType.php b/src/Form/Filters/Constraints/NumberConstraintType.php index 022cfdbe..25b6666a 100644 --- a/src/Form/Filters/Constraints/NumberConstraintType.php +++ b/src/Form/Filters/Constraints/NumberConstraintType.php @@ -39,7 +39,7 @@ class NumberConstraintType extends AbstractType '>' => '>', '<=' => '<=', '>=' => '>=', - 'BETWEEN' => 'BETWEEN', + 'filter.number_constraint.value.operator.BETWEEN' => 'BETWEEN', ]; $builder->add('value1', NumberType::class, array_merge_recursive([ diff --git a/src/Form/Filters/Constraints/TextConstraintType.php b/src/Form/Filters/Constraints/TextConstraintType.php index be54a3ee..2344b883 100644 --- a/src/Form/Filters/Constraints/TextConstraintType.php +++ b/src/Form/Filters/Constraints/TextConstraintType.php @@ -27,13 +27,13 @@ class TextConstraintType extends AbstractType { $choices = [ '' => '', - '=' => '=', - '!=' => '!=', - 'STARTS' => 'STARTS', - 'ENDS' => 'ENDS', - 'CONTAINS' => 'CONTAINS', - 'LIKE' => 'LIKE', - 'REGEX' => 'REGEX', + 'filter.text_constraint.value.operator.EQ' => '=', + 'filter.text_constraint.value.operator.NEQ' => '!=', + 'filter.text_constraint.value.operator.STARTS' => 'STARTS', + 'filter.text_constraint.value.operator.ENDS' => 'ENDS', + 'filter.text_constraint.value.operator.CONTAINS' => 'CONTAINS', + 'filter.text_constraint.value.operator.LIKE' => 'LIKE', + 'filter.text_constraint.value.operator.REGEX' => 'REGEX', ]; $builder->add('value', SearchType::class, [ diff --git a/templates/Form/FilterTypesLayout.html.twig b/templates/Form/FilterTypesLayout.html.twig index ec082128..25a23e0f 100644 --- a/templates/Form/FilterTypesLayout.html.twig +++ b/templates/Form/FilterTypesLayout.html.twig @@ -6,7 +6,7 @@ "data-action": "change->filters--number-constraint#update" }}) }} {{ form_widget(form.value1) }} - AND + {% trans %}filter.number_constraint.AND{% endtrans %} {{ form_widget(form.value2, {"attr": {"class": "d-none", "data-filters--number-constraint-target": "thingsToHide"}}) }} {% if form.vars["text_suffix"] %} {{ form.vars["text_suffix"] }} diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 04ccc941..13fb5de1 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -9357,5 +9357,59 @@ Element 3 Do you really want to delete this attachment? + + + filter.text_constraint.value.operator.EQ + Is + + + + + filter.text_constraint.value.operator.NEQ + Is not + + + + + filter.text_constraint.value.operator.STARTS + Starts with + + + + + filter.text_constraint.value.operator.CONTAINS + Contains + + + + + filter.text_constraint.value.operator.ENDS + Ends with + + + + + filter.text_constraint.value.operator.LIKE + LIKE pattern + + + + + filter.text_constraint.value.operator.REGEX + Regular expression + + + + + filter.number_constraint.value.operator.BETWEEN + Between + + + + + filter.number_constraint.AND + and + +