diff --git a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml
index fbfd57d6c..4ddad2292 100644
--- a/src/Bundle/ChillActivityBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillActivityBundle/translations/messages.fr.yml
@@ -96,9 +96,6 @@ activity_filter:
My activities: Mes échanges (où j'interviens)
Types: Par type d'échange
Jobs: Par métier impliqué
- By: Filtrer par
- Search: Chercher dans la liste
- By date: Filtrer par date
#timeline
'%user% has done an %activity_type%': '%user% a effectué un échange de type "%activity_type%"'
diff --git a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
index 1f373400c..f22b6bfba 100644
--- a/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
+++ b/src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
@@ -39,7 +39,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
'label' => false,
'required' => false,
'attr' => [
- 'placeholder' => 'activity_filter.Search',
+ 'placeholder' => 'filter_order.Search',
]
]);
}
@@ -47,16 +47,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
$checkboxesBuilder = $builder->create('checkboxes', null, ['compound' => true]);
foreach ($helper->getCheckboxes() as $name => $c) {
- $choices = array_combine(
- array_map(static function ($c, $t) {
- if (null !== $t) {
- return $t;
- }
-
- return $c;
- }, $c['choices'], $c['trans']),
- $c['choices']
- );
+ $choices = self::buildCheckboxChoices($c['choices'], $c['trans']);
$checkboxesBuilder->add($name, ChoiceType::class, [
'choices' => $choices,
@@ -125,6 +116,20 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
}
}
+ public static function buildCheckboxChoices(array $choices, array $trans = []): array
+ {
+ return array_combine(
+ array_map(static function ($c, $t) {
+ if (null !== $t) {
+ return $t;
+ }
+
+ return $c;
+ }, $choices, $trans),
+ $choices
+ );
+ }
+
public function buildView(FormView $view, FormInterface $form, array $options)
{
/** @var FilterOrderHelper $helper */
diff --git a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
index b2673b60c..b517eb154 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/FilterOrder/base.html.twig
@@ -1,92 +1,120 @@
{{ form_start(form) }}
- {% set btnSubmit = 0 %}
-
-
- {% if form.vars.has_search_box %}
-
-
- {{ form_widget(form.q) }}
-
-
-
- {% endif %}
-
- {% if form.dateRanges is defined %}
- {% set btnSubmit = 1 %}
- {% if form.dateRanges|length > 0 %}
- {% for dateRangeName, _o in form.dateRanges %}
-
- {% if form.dateRanges[dateRangeName].vars.label is not same as(false) %}
- {{ form_label(form.dateRanges[dateRangeName])}}
- {% else %}
-
+ {% if form.dateRanges is defined %}
+ {% set btnSubmit = 1 %}
+ {% if form.dateRanges|length > 0 %}
+ {% for dateRangeName, _o in form.dateRanges %}
+
+ {% if form.dateRanges[dateRangeName].vars.label is not same as(false) %}
+ {{ form_label(form.dateRanges[dateRangeName])}}
+ {% else %}
+