bug #17600 Fixed the Bootstrap form theme for inlined checkbox/radio (javiereguiluz)

This PR was merged into the 2.7 branch.

Discussion
----------

Fixed the Bootstrap form theme for inlined checkbox/radio

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14704
| License       | MIT
| Doc PR        | -

@qferr provided the solution for this bug. I only verified it and created the PR.

@aderuwe @JHGitty @tjaadvd all of you took part in the original discussion. Could you please verify if this change fixes your issues? Thanks.

Commits
-------

cb1a921 Fixed the Bootstrap form theme for inlined checkbox/radio
This commit is contained in:
Fabien Potencier 2016-02-04 07:16:44 +01:00
commit 9983cfbdc8

View File

@ -115,7 +115,7 @@
{%- endblock choice_widget_expanded %}
{% block checkbox_widget -%}
{% set parent_label_class = parent_label_class|default('') -%}
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
{% if 'checkbox-inline' in parent_label_class %}
{{- form_label(form, null, { widget: parent() }) -}}
{% else -%}
@ -126,7 +126,7 @@
{%- endblock checkbox_widget %}
{% block radio_widget -%}
{%- set parent_label_class = parent_label_class|default('') -%}
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
{% if 'radio-inline' in parent_label_class %}
{{- form_label(form, null, { widget: parent() }) -}}
{% else -%}