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

Skip to content

Commit a8d74c5

Browse files
committed
remove unnecessary css class "d-block" from form_errors
1 parent 566a445 commit a8d74c5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
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
@@ -289,7 +289,7 @@
289289

290290
{% block form_errors -%}
291291
{%- if errors|length > 0 -%}
292-
<div class="{% if form is not rootform %}invalid-feedback{% else %}alert alert-danger{% endif %} d-block">
292+
<div class="{% if form is not rootform %}invalid-feedback{% else %}alert alert-danger{% endif %}">
293293
{%- for error in errors -%}
294294
<span class="d-block">
295295
<span class="form-error-message">{{ error.message }}</span>

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testRow()
3434
/following-sibling::div[@class="col-sm-10"]
3535
[
3636
./input[@id="name"]
37-
/following-sibling::div[@class="alert alert-danger d-block"]
37+
/following-sibling::div[@class="alert alert-danger"]
3838
[
3939
./span[@class="d-block"]
4040
[

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4LayoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testRow()
4141
[
4242
./label[@for="name"]
4343
/following-sibling::input[@id="name"]
44-
/following-sibling::div[@class="alert alert-danger d-block"]
44+
/following-sibling::div[@class="alert alert-danger"]
4545
[
4646
./span[@class="d-block"]
4747
[
@@ -288,7 +288,7 @@ public function testErrors()
288288
$html = $this->renderErrors($view);
289289

290290
$this->assertMatchesXpath($html,
291-
'/div[@class="alert alert-danger d-block"]
291+
'/div[@class="alert alert-danger"]
292292
[
293293
./span[@class="d-block"]
294294
[./span[.="[trans]Error 1[/trans]"]]

0 commit comments

Comments
 (0)