Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7cae00f

Browse files
Add label_raw attribute to form theme
1 parent 446480e commit 7cae00f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,14 @@
275275
{% set label = name|humanize %}
276276
{%- endif -%}
277277
{%- endif -%}
278+
{%- if translation_domain is not same as(false) -%}
279+
{%- set label = label|trans(label_translation_parameters, translation_domain) -%}
280+
{%- endif -%}
278281
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>
279-
{%- if translation_domain is same as(false) -%}
280-
{{- label -}}
282+
{%- if label_raw|default(false) -%}
283+
{{- label|raw -}}
281284
{%- else -%}
282-
{{- label|trans(label_translation_parameters, translation_domain) -}}
285+
{{- label -}}
283286
{%- endif -%}
284287
</{{ element|default('label') }}>
285288
{%- endif -%}

0 commit comments

Comments
 (0)