Skip to content

Commit e55c67a

Browse files
vudaltsovfabpot
authored andcommitted
[TwigBridge] Bootstrap 4 form theme fixes
1 parent fdac9e3 commit e55c67a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
{# Labels #}
7171

7272
{% block form_label -%}
73-
{%- if expanded is defined and expanded -%}
73+
{%- if compound is defined and compound -%}
7474
{%- set element = 'legend' -%}
7575
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-legend')|trim}) -%}
76+
{%- else -%}
77+
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%}
7678
{%- endif -%}
77-
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%}
7879
{{- parent() -}}
7980
{%- endblock form_label %}
8081

@@ -107,7 +108,7 @@
107108
{# Rows #}
108109

109110
{% block form_row -%}
110-
{%- if expanded is defined and expanded -%}
111+
{%- if compound is defined and compound -%}
111112
{%- set element = 'fieldset' -%}
112113
{%- endif -%}
113114
<{{ element|default('div') }} class="form-group">

0 commit comments

Comments
 (0)