From 4f6092bd752b3c9b2082a25d7d2c98617af11612 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 28 Aug 2021 13:24:05 +0200 Subject: [PATCH] Avoid missing translation on batch confirmation --- src/Form/Type/Filter/FilterDataType.php | 10 ++++++++-- src/Resources/views/CRUD/batch_confirmation.html.twig | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Form/Type/Filter/FilterDataType.php b/src/Form/Type/Filter/FilterDataType.php index 35c4e8c13d..939a47a99f 100644 --- a/src/Form/Type/Filter/FilterDataType.php +++ b/src/Form/Type/Filter/FilterDataType.php @@ -26,8 +26,14 @@ final class FilterDataType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options): void { $builder - ->add('type', $options['operator_type'], $options['operator_options'] + ['required' => false]) - ->add('value', $options['field_type'], $options['field_options'] + ['required' => false]); + ->add('type', $options['operator_type'], $options['operator_options'] + [ + 'label' => false, + 'required' => false, + ]) + ->add('value', $options['field_type'], $options['field_options'] + [ + 'label' => false, + 'required' => false, + ]); $builder ->addModelTransformer(new FilterDataTransformer()); diff --git a/src/Resources/views/CRUD/batch_confirmation.html.twig b/src/Resources/views/CRUD/batch_confirmation.html.twig index f5821ff25f..4db10abbb6 100644 --- a/src/Resources/views/CRUD/batch_confirmation.html.twig +++ b/src/Resources/views/CRUD/batch_confirmation.html.twig @@ -48,7 +48,9 @@ file that was distributed with this source code. {{ form_rest(form) }} - + {% if admin.hasRoute('list') and admin.hasAccess('list') %} {{ 'delete_or'|trans({}, 'SonataAdminBundle') }}