Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7cae00f

Browse filesBrowse files
Add label_raw attribute to form theme
1 parent 446480e commit 7cae00f
Copy full SHA for 7cae00f

File tree

1 file changed

+6
-3
lines changed
Filter options

1 file changed

+6
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
+6-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.