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

Skip to content

Commit 2617c46

Browse files
Added another if conditional
1 parent fa1b21b commit 2617c46

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,21 @@
100100
{%- endif -%}
101101
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
102102
{{- widget|raw }}
103-
{%- if translation_domain is same as(false) -%}
104-
{%- if label_html is same as(false) -%}
105-
{{- label -}}
103+
{%- if label is not same as(false) -%}
104+
{%- if translation_domain is same as(false) -%}
105+
{%- if label_html is same as(false) -%}
106+
{{- label -}}
107+
{%- else -%}
108+
{{- label|raw -}}
109+
{%- endif -%}
106110
{%- else -%}
107-
{{- label|raw -}}
111+
{%- if label_html is same as(false) -%}
112+
{{- label|trans(label_translation_parameters, translation_domain) -}}
113+
{%- else -%}
114+
{{- label|trans(label_translation_parameters, translation_domain)|raw -}}
115+
{%- endif -%}
108116
{%- endif -%}
109-
{%- else -%}
110-
{%- if label_html is same as(false) -%}
111-
{{- label|trans(label_translation_parameters, translation_domain) -}}
112-
{%- else -%}
113-
{{- label|trans(label_translation_parameters, translation_domain)|raw -}}
114-
{%- endif -%}
115-
{%- endif -%}
117+
{%- endif -%}
116118
</label>
117119
{%- endif -%}
118120
{%- endblock checkbox_radio_label %}

0 commit comments

Comments
 (0)