bug #15446 [Twig][Bridge] force space between widget and label in checkbox_radio_label (MatTheCat)

This PR was submitted for the 2.6 branch but it was merged into the 2.7 branch instead (closes #15446).

Discussion
----------

[Twig][Bridge] force space between widget and label in checkbox_radio_label

| Q             | A
| ------------- | ---
| Fixed tickets | N/A
| License       | MIT

Update

![without space](https://cloud.githubusercontent.com/assets/1898254/9058780/481326ae-3aa4-11e5-9a8a-ebd6bf963361.png)

to

![with space](https://cloud.githubusercontent.com/assets/1898254/9058791/52184238-3aa4-11e5-854f-4a8105dacb84.png)

Commits
-------

ed9c610 [Twig][Bridge] force space between widget and label in checkbox_radio_label
This commit is contained in:
Fabien Potencier 2015-09-28 11:09:47 +02:00
commit c43bf08b09
2 changed files with 14 additions and 15 deletions

View File

@ -170,8 +170,7 @@
{% set label = name|humanize %}
{% endif %}
<label{% for attrname, attrvalue in label_attr %} {{ attrname }}="{{ attrvalue }}"{% endfor %}>
{{- widget|raw -}}
{{- label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
{{- widget|raw }} {{ label is not same as(false) ? (translation_domain is same as(false) ? label : label|trans({}, translation_domain)) -}}
</label>
{% endif %}
{% endblock checkbox_radio_label %}