minor #11550 [Form] fix whitespace in Twig form template (craue)
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] fix whitespace in Twig form template
| Q | A
| ------------- | ---
| Bug fix? | kind of (after updating from 2.3.17 to 2.3.18, some of my tests were broken because of this)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | they should, let's see what Travis has to say...
| Fixed tickets | --
| License | MIT
| Doc PR | --
This fixes some whitespace rendering.
after merging #11386:
```html
<input type="text" id="myfield" name="myfield" value="blah" />
```
before merging #11386 and with this PR again:
```html
<input type="text" id="myfield" name="myfield" value="blah" />
```
Commits
-------
8504d02
fixed whitespace in Twig form template
This commit is contained in:
commit
1ba7c72b09
@ -299,7 +299,7 @@
|
|||||||
|
|
||||||
{% block widget_attributes -%}
|
{% block widget_attributes -%}
|
||||||
id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
|
id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
|
||||||
{% for attrname, attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}" {% else %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %}
|
{%- for attrname, attrvalue in attr %} {% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}"{% else %}{{ attrname }}="{{ attrvalue }}"{% endif %}{% endfor %}
|
||||||
{%- endblock widget_attributes %}
|
{%- endblock widget_attributes %}
|
||||||
|
|
||||||
{% block widget_container_attributes -%}
|
{% block widget_container_attributes -%}
|
||||||
|
Reference in New Issue
Block a user