Skip to content

Commit f7e8e30

Browse files
Merge branch '4.1' into 4.2
* 4.1: [Twig] Replace for-loops with blocks for attributes fixed CS [Tests] Change to willThrowException [Console] fix PHPDoc in Command Update FileLoaderLoadException.php Fix wrong calls to clearstatcache Add Vietnamese translation for validators Allow running PHPUnit with "xdebug.scream" ON [VarDumper] Add descriptors tests [Yaml] detect circular references [DI] fix reporting bindings on overriden services as unused [Routing] minor fix or previous PR
2 parents 410ecc5 + 4712fc7 commit f7e8e30

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Resources/views/Form/bootstrap_3_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{% set label = name|humanize %}
9999
{%- endif -%}
100100
{%- endif -%}
101-
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
101+
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
102102
{{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
103103
</label>
104104
{%- endif -%}

Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
{%- endif -%}
261261

262262
{{ widget|raw }}
263-
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
263+
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
264264
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
265265
{{- form_errors(form) -}}
266266
</label>

Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@
352352
{%- else -%}
353353
{% set form_method = "POST" %}
354354
{%- endif -%}
355-
<form{% if name != '' %} name="{{ name }}"{% endif %} method="{{ form_method|lower }}"{% if action != '' %} action="{{ action }}"{% endif %}{% for attrname, attrvalue in attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}{% if multipart %} enctype="multipart/form-data"{% endif %}>
355+
<form{% if name != '' %} name="{{ name }}"{% endif %} method="{{ form_method|lower }}"{% if action != '' %} action="{{ action }}"{% endif %}{{ block('attributes') }}{% if multipart %} enctype="multipart/form-data"{% endif %}>
356356
{%- if form_method != method -%}
357357
<input type="hidden" name="_method" value="{{ method }}" />
358358
{%- endif -%}

Resources/views/Form/foundation_5_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
{% set label = name|humanize %}
259259
{%- endif -%}
260260
{% endif %}
261-
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
261+
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
262262
{{ widget|raw }}
263263
{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}
264264
</label>

0 commit comments

Comments
 (0)