Skip to content

Commit

Permalink
Avoid missing translation on batch confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Aug 30, 2021
1 parent 199e3a2 commit 0346f4b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/Form/Type/Filter/FilterDataType.php
Expand Up @@ -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());
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/views/CRUD/batch_confirmation.html.twig
Expand Up @@ -48,7 +48,9 @@ file that was distributed with this source code.
{{ form_rest(form) }}
</div>

<button type="submit" class="btn btn-danger">{{ 'btn_execute_batch_action'|trans({}, 'SonataAdminBundle') }}</button>
<button type="submit" class="btn btn-danger">
{{ 'btn_execute_batch_action'|trans({}, 'SonataAdminBundle') }}
</button>

{% if admin.hasRoute('list') and admin.hasAccess('list') %}
{{ 'delete_or'|trans({}, 'SonataAdminBundle') }}
Expand Down

0 comments on commit 0346f4b

Please sign in to comment.