Skip to content

Commit

Permalink
Removing usage of "form-horizonal" and "form-inline" classes.
Browse files Browse the repository at this point in the history
They don't exists in Bootstrap 5
  • Loading branch information
ADmad committed Nov 29, 2024
1 parent df3a7f3 commit ee34247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1299,8 +1299,6 @@ protected function _processFormOptions(array $options): array
return $options;
}

$options = $this->injectClasses('form-' . $this->_align, $options);

if ($this->_align === 'inline') {
$options = $this->injectClasses(
[
Expand Down
6 changes: 2 additions & 4 deletions tests/TestCase/View/Helper/FormHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ public function testInlineFormCreate()
'method' => 'post',
'accept-charset' => 'utf-8',
'action' => '/articles/add',
'class' => 'form-inline row g-3 align-items-center',
'class' => 'row g-3 align-items-center',
],
];
$this->assertHtml($expected, $result);
Expand All @@ -658,7 +658,7 @@ public function testInlineFormCreateWithCustomSpacing()
'method' => 'post',
'accept-charset' => 'utf-8',
'action' => '/articles/add',
'class' => 'form-inline row custom-spacing align-items-center',
'class' => 'row custom-spacing align-items-center',
],
];
$this->assertHtml($expected, $result);
Expand All @@ -672,7 +672,6 @@ public function testHorizontalFormCreate()
'method' => 'post',
'accept-charset' => 'utf-8',
'action' => '/articles/add',
'class' => 'form-horizontal',
],
];
$this->assertHtml($expected, $result);
Expand Down Expand Up @@ -770,7 +769,6 @@ public function testHorizontalFormCreateFromConfig()
'method' => 'post',
'accept-charset' => 'utf-8',
'action' => '/articles/add',
'class' => 'form-horizontal',
],
];
$this->assertHtml($expected, $result);
Expand Down

0 comments on commit ee34247

Please sign in to comment.