Skip to content

Commit

Permalink
Merge branch '5.2' into 5.x
Browse files Browse the repository at this point in the history
* 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
  ...
  • Loading branch information
nicolas-grekas committed May 7, 2021
2 parents 40c7cd2 + dcdc60a commit b73bf52
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Resources/views/Form/bootstrap_4_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@
{% block file_widget -%}
<{{ element|default('div') }} class="custom-file">
{%- set type = type|default('file') -%}
{{- block('form_widget_simple') -}}
{%- set label_attr = label_attr|merge({ class: (label_attr.class|default('') ~ ' custom-file-label')|trim }) -%}
{%- 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 %}>
{%- set attr = {lang: input_lang} | merge(attr) -%}
{{- block('form_widget_simple') -}}
{%- 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 %}>
{%- if attr.placeholder is defined and attr.placeholder is not none -%}
{{- translation_domain is same as(false) ? attr.placeholder : attr.placeholder|trans({}, translation_domain) -}}
{%- endif -%}
Expand Down

0 comments on commit b73bf52

Please sign in to comment.