Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb3e712

Browse files
vudaltsovnicolas-grekas
authored andcommitted
[Form] Removed .form-control-label class.
1 parent 601cc08 commit cb3e712

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
{%- set element = 'legend' -%}
188188
{%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%}
189189
{%- else -%}
190-
{%- set label_attr = label_attr|merge({for: id, class: (label_attr.class|default('') ~ ' form-control-label')|trim}) -%}
190+
{%- set label_attr = label_attr|merge({for: id}) -%}
191191
{%- endif -%}
192192
{% if required -%}
193193
{% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' required')|trim}) %}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/asset": "~2.8|~3.0|~4.0",
2424
"symfony/dependency-injection": "~2.8|~3.0|~4.0",
2525
"symfony/finder": "~2.8|~3.0|~4.0",
26-
"symfony/form": "^3.4.9|^4.0.9",
26+
"symfony/form": "^3.4.13|~4.0.13|^4.1.2",
2727
"symfony/http-foundation": "^3.3.11|~4.0",
2828
"symfony/http-kernel": "~3.2|~4.0",
2929
"symfony/polyfill-intl-icu": "~1.0",
@@ -41,7 +41,7 @@
4141
"symfony/workflow": "~3.3|~4.0"
4242
},
4343
"conflict": {
44-
"symfony/form": "<3.4.9|<4.0.9,>=4.0",
44+
"symfony/form": "<3.4.13|>=4.0,<4.0.13|>=4.1,<4.1.2",
4545
"symfony/console": "<3.4"
4646
},
4747
"suggest": {

src/Symfony/Component/Form/Tests/AbstractBootstrap4HorizontalLayoutTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testLabelDoesNotRenderFieldAttributes()
7272
$this->assertMatchesXpath($html,
7373
'/label
7474
[@for="name"]
75-
[@class="col-form-label col-sm-2 form-control-label required"]
75+
[@class="col-form-label col-sm-2 required"]
7676
'
7777
);
7878
}
@@ -89,7 +89,7 @@ public function testLabelWithCustomAttributesPassedDirectly()
8989
$this->assertMatchesXpath($html,
9090
'/label
9191
[@for="name"]
92-
[@class="my&class col-form-label col-sm-2 form-control-label required"]
92+
[@class="my&class col-form-label col-sm-2 required"]
9393
'
9494
);
9595
}
@@ -106,7 +106,7 @@ public function testLabelWithCustomTextAndCustomAttributesPassedDirectly()
106106
$this->assertMatchesXpath($html,
107107
'/label
108108
[@for="name"]
109-
[@class="my&class col-form-label col-sm-2 form-control-label required"]
109+
[@class="my&class col-form-label col-sm-2 required"]
110110
[.="[trans]Custom label[/trans]"]
111111
'
112112
);
@@ -126,7 +126,7 @@ public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly
126126
$this->assertMatchesXpath($html,
127127
'/label
128128
[@for="name"]
129-
[@class="my&class col-form-label col-sm-2 form-control-label required"]
129+
[@class="my&class col-form-label col-sm-2 required"]
130130
[.="[trans]Custom label[/trans]"]
131131
'
132132
);

src/Symfony/Component/Form/Tests/AbstractBootstrap4LayoutTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testLabelDoesNotRenderFieldAttributes()
8181
$this->assertMatchesXpath($html,
8282
'/label
8383
[@for="name"]
84-
[@class="form-control-label required"]
84+
[@class="required"]
8585
'
8686
);
8787
}
@@ -98,7 +98,7 @@ public function testLabelWithCustomAttributesPassedDirectly()
9898
$this->assertMatchesXpath($html,
9999
'/label
100100
[@for="name"]
101-
[@class="my&class form-control-label required"]
101+
[@class="my&class required"]
102102
'
103103
);
104104
}
@@ -115,7 +115,7 @@ public function testLabelWithCustomTextAndCustomAttributesPassedDirectly()
115115
$this->assertMatchesXpath($html,
116116
'/label
117117
[@for="name"]
118-
[@class="my&class form-control-label required"]
118+
[@class="my&class required"]
119119
[.="[trans]Custom label[/trans]"]
120120
'
121121
);
@@ -135,7 +135,7 @@ public function testLabelWithCustomTextAsOptionAndCustomAttributesPassedDirectly
135135
$this->assertMatchesXpath($html,
136136
'/label
137137
[@for="name"]
138-
[@class="my&class form-control-label required"]
138+
[@class="my&class required"]
139139
[.="[trans]Custom label[/trans]"]
140140
'
141141
);

0 commit comments

Comments
 (0)