diff --git a/src/PrestaShopBundle/Form/Admin/Sell/Customer/CustomerType.php b/src/PrestaShopBundle/Form/Admin/Sell/Customer/CustomerType.php index 4744cd56cbe9d..2f00c99e7c0c8 100644 --- a/src/PrestaShopBundle/Form/Admin/Sell/Customer/CustomerType.php +++ b/src/PrestaShopBundle/Form/Admin/Sell/Customer/CustomerType.php @@ -297,6 +297,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ), 'empty_data' => [], 'choices' => $this->groupByIdChoiceProvider->getChoices(), + 'display_total_items' => true, ]) ->add('default_group_id', GroupType::class, [ 'label' => $this->trans('Default customer group', 'Admin.Orderscustomers.Feature'), diff --git a/src/PrestaShopBundle/Form/Admin/Type/Material/MaterialChoiceTableType.php b/src/PrestaShopBundle/Form/Admin/Type/Material/MaterialChoiceTableType.php index 7133f09638c6d..86aceebc3d07c 100644 --- a/src/PrestaShopBundle/Form/Admin/Type/Material/MaterialChoiceTableType.php +++ b/src/PrestaShopBundle/Form/Admin/Type/Material/MaterialChoiceTableType.php @@ -45,6 +45,7 @@ public function configureOptions(OptionsResolver $resolver) $resolver->setDefaults([ 'expanded' => true, 'multiple' => true, + 'display_total_items' => false, ]); } @@ -62,6 +63,7 @@ public function getParent() public function buildView(FormView $view, FormInterface $form, array $options): void { $view->vars['isCheckSelectAll'] = count($form->getViewData()) === count($options['choices']); + $view->vars['displayTotalItems'] = (bool) $options['display_total_items']; } /** diff --git a/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/bootstrap_4_layout.html.twig b/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/bootstrap_4_layout.html.twig index 4aaa1d25c3d4b..e23646ae30ebd 100644 --- a/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/bootstrap_4_layout.html.twig +++ b/src/PrestaShopBundle/Resources/views/Admin/TwigTemplateForm/bootstrap_4_layout.html.twig @@ -589,7 +589,7 @@ {% endif %} > - {{ 'Select all'|trans({}, 'Admin.Actions') }} + {{ 'Select all'|trans({}, 'Admin.Actions') }} {% if form.vars.displayTotalItems %} ({{ form|length }}) {% endif %}