Skip to content

Commit 814969d

Browse files
committed
Remove usage of "form-horizonal" and "form-inline" classes.
They don't exist in Bootstrap 5
1 parent 0427f70 commit 814969d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/View/Helper/FormHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,6 @@ protected function _processFormOptions(array $options): array
12841284
return $options;
12851285
}
12861286

1287-
$options = $this->injectClasses('form-' . $this->_align, $options);
1288-
12891287
if ($this->_align === static::ALIGN_INLINE) {
12901288
$options = $this->injectClasses(
12911289
[

tests/TestCase/View/Helper/FormHelperTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ public function testInlineFormCreate()
641641
'method' => 'post',
642642
'accept-charset' => 'utf-8',
643643
'action' => '/articles/add',
644-
'class' => 'form-inline row g-3 align-items-center',
644+
'class' => 'row g-3 align-items-center',
645645
],
646646
];
647647
$this->assertHtml($expected, $result);
@@ -658,7 +658,7 @@ public function testInlineFormCreateWithCustomSpacing()
658658
'method' => 'post',
659659
'accept-charset' => 'utf-8',
660660
'action' => '/articles/add',
661-
'class' => 'form-inline row custom-spacing align-items-center',
661+
'class' => 'row custom-spacing align-items-center',
662662
],
663663
];
664664
$this->assertHtml($expected, $result);
@@ -672,7 +672,6 @@ public function testHorizontalFormCreate()
672672
'method' => 'post',
673673
'accept-charset' => 'utf-8',
674674
'action' => '/articles/add',
675-
'class' => 'form-horizontal',
676675
],
677676
];
678677
$this->assertHtml($expected, $result);
@@ -770,7 +769,6 @@ public function testHorizontalFormCreateFromConfig()
770769
'method' => 'post',
771770
'accept-charset' => 'utf-8',
772771
'action' => '/articles/add',
773-
'class' => 'form-horizontal',
774772
],
775773
];
776774
$this->assertHtml($expected, $result);

0 commit comments

Comments
 (0)