Skip to content

Commit ca845c6

Browse files
committed
bug #24874 [TwigBridge] Fixed the .form-check-input class in the bs4 templates (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #24874). Discussion ---------- [TwigBridge] Fixed the .form-check-input class in the bs4 templates | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | If I am not mistaken, the `form-check-input` class should always be present in inputs of checkboxes and radios Commits ------- 95a90e4231 [TwigBridge] Fixed the .form-check-input class in the bs4 templates
2 parents 7a5ce12 + 8491863 commit ca845c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
{% block checkbox_widget -%}
7373
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
74-
{%- set attr = attr|merge({class: attr.class|default('form-check-input')}) -%}
74+
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
7575
{% if 'checkbox-inline' in parent_label_class %}
7676
{{- form_label(form, null, { widget: parent() }) -}}
7777
{% else -%}
@@ -83,7 +83,7 @@
8383

8484
{% block radio_widget -%}
8585
{%- set parent_label_class = parent_label_class|default(label_attr.class|default('')) -%}
86-
{%- set attr = attr|merge({class: attr.class|default('form-check-input')}) -%}
86+
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-check-input')|trim}) -%}
8787
{%- if 'radio-inline' in parent_label_class -%}
8888
{{- form_label(form, null, { widget: parent() }) -}}
8989
{%- else -%}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"symfony/asset": "~2.8|~3.0|~4.0",
2525
"symfony/dependency-injection": "~2.8|~3.0|~4.0",
2626
"symfony/finder": "~2.8|~3.0|~4.0",
27-
"symfony/form": "~3.4-beta2|~4.0-beta2",
27+
"symfony/form": "~3.4|~4.0",
2828
"symfony/http-foundation": "^3.3.11|~4.0",
2929
"symfony/http-kernel": "~3.2|~4.0",
3030
"symfony/polyfill-intl-icu": "~1.0",
@@ -41,7 +41,7 @@
4141
"symfony/web-link": "~3.3|~4.0"
4242
},
4343
"conflict": {
44-
"symfony/form": "<3.4",
44+
"symfony/form": "<3.4-beta4|~4.0,<4.0-beta4",
4545
"symfony/console": "<3.4"
4646
},
4747
"suggest": {

0 commit comments

Comments
 (0)