8000 bug #17600 Fixed the Bootstrap form theme for inlined checkbox/radio … · symfony/symfony@9983cfb · GitHub
[go: up one dir, main page]

Skip to content

Commit 9983cfb

Browse files
committed
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
2 parents 114e5d6 + cb1a921 commit 9983cfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
{%- endblock choice_widget_expanded %}
116116

117117
{% block checkbox_widget -%}
118-
{% set parent_label_class = parent_label_class|default('') -%}
118+
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
119119
{% if 'checkbox-inline' in parent_label_class %}
120120
{{- form_label(form, null, { widget: parent() }) -}}
121121
{% else -%}
@@ -126,7 +126,7 @@
126126
{%- endblock checkbox_widget %}
127127

128128
{% block radio_widget -%}
129-
{%- set parent_label_class = parent_label_class|default('') -%}
129+
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
130130
{% if 'radio-inline' in parent_label_class %}
131131
{{- form_label(form, null, { widget: parent() }) -}}
132132
{% else -%}

0 commit comments

Comments
 (0)
0