Skip to content

Commit b73bf52

Browse files
Merge branch '5.2' into 5.x
* 5.2: (23 commits) [Console] Fix Windows code page support [SecurityBundle] Allow ips parameter in access_control accept comma-separated string [Form] Add TranslatableMessage support to choice_label option of ChoiceType Remove code that deals with legacy behavior of PHP_Incomplete_Class [Config][DependencyInjection] Uniformize trailing slash handling [PropertyInfo] Make ReflectionExtractor correctly extract nullability [PropertyInfo] fix attribute namespace with recursive traits [PhpUnitBridge] Fix tests with `@doesNotPerformAssertions` annotations Check redis extension version [Security] Update Russian translations [Notifier] Fix return SentMessage then Messenger not used [VarExporter] Add support of PHP enumerations [Security] Added missing Japanese translations [Security] Added missing Polish translations [Security] Add missing Italian translations #41051 [Security] Missing translations pt_BR getProtocolVersion may return null Fix return type on isAllowedProperty method Make FailoverTransport always pick the first transport [TwigBridge] Fix HTML for translatable custom-file label in Bootstrap 4 theme ...
2 parents 40c7cd2 + dcdc60a commit b73bf52

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,12 @@
121121
{% block file_widget -%}
122122
<{{ element|default('div') }} class="custom-file">
123123
{%- set type = type|default('file') -%}
124-
{{- block('form_widget_simple') -}}
125-
{%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim }) -%}
126124
{%- set input_lang = 'en' -%}
127125
{% if app is defined and app.request is defined %}{%- set input_lang = app.request.locale -%}{%- endif -%}
128-
<label for="{{ form.vars.id }}" lang="{{ input_lang }}" {% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
126+
{%- set attr = {lang: input_lang} | merge(attr) -%}
127+
{{- block('form_widget_simple') -}}
128+
{%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim }) -%}
129+
<label for="{{ form.vars.id }}" {% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
129130
{%- if attr.placeholder is defined and attr.placeholder is not none -%}
130131
{{- translation_domain is same as(false) ? attr.placeholder : attr.placeholder|trans({}, translation_domain) -}}
131132
{%- endif -%}

0 commit comments

Comments
 (0)