Update bootstrap_4_layout.html.twig
This commit is contained in:
parent
71de43128f
commit
b1b724f716
@ -123,7 +123,9 @@
|
|||||||
{%- set type = type|default('file') -%}
|
{%- set type = type|default('file') -%}
|
||||||
{{- block('form_widget_simple') -}}
|
{{- block('form_widget_simple') -}}
|
||||||
{%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim }) -%}
|
{%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim }) -%}
|
||||||
<label for="{{ form.vars.id }}" {% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
|
{%- set input_lang = 'en' -%}
|
||||||
|
{% if app is defined and app.request is defined %}{%- set input_lang = app.request.locale -%}{%- endif -%}
|
||||||
|
<label for="{{ form.vars.id }}" lang="{{ input_lang }}" {% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
|
||||||
{%- if attr.placeholder is defined and attr.placeholder is not none -%}
|
{%- if attr.placeholder is defined and attr.placeholder is not none -%}
|
||||||
{{- translation_domain is same as(false) ? attr.placeholder : attr.placeholder|trans({}, translation_domain) -}}
|
{{- translation_domain is same as(false) ? attr.placeholder : attr.placeholder|trans({}, translation_domain) -}}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
Reference in New Issue
Block a user