Skip to content

Commit 4314de0

Browse files
author
m-nagai
committed
fix translate warning when widget_prefix and widget_suffix are empty
1 parent c34671a commit 4314de0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Resources/views/Form/fields.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@
543543
{% if 'tab' in form.vars.block_prefixes %}
544544
{{ block('form_tab') }}
545545
{% elseif embed_form is sameas(true) %}
546-
{{ widget_prefix|trans({}, translation_domain)|raw }} {{ form_widget(form, _context) }} {{ widget_suffix|trans({}, translation_domain)|raw }}
546+
{% if widget_prefix is not empty %}{{ widget_prefix|trans({}, translation_domain)|raw }}{% endif %} {{ form_widget(form, _context) }} {% if widget_suffix is not empty %}{{ widget_suffix|trans({}, translation_domain)|raw }}{% endif %}
547547
{% else %}
548548
{{ block('widget_form_group_start') }}
549549

@@ -557,7 +557,7 @@
557557
<div class="{{ horizontal_input_wrapper_class }}">
558558
{% endif %}
559559

560-
{{ widget_prefix|trans({}, translation_domain)|raw }} {{ form_widget(form, _context) }} {{ widget_suffix|trans({}, translation_domain)|raw }}
560+
{% if widget_prefix is not empty %}{{ widget_prefix|trans({}, translation_domain)|raw }}{% endif %} {{ form_widget(form, _context) }} {% if widget_suffix is not empty %}{{ widget_suffix|trans({}, translation_domain)|raw }}{% endif %}
561561

562562
{% set type = type|default('text') %}
563563
{% if type != 'hidden' %}

0 commit comments

Comments
 (0)