Skip to content

Commit

Permalink
Remove usage of "form-horizonal" and "form-inline" classes.
Browse files Browse the repository at this point in the history
They don't exist in Bootstrap 5
  • Loading branch information
ADmad committed Nov 30, 2024
1 parent 0427f70 commit 814969d
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 @@ -1284,8 +1284,6 @@ protected function _processFormOptions(array $options): array
return $options;
}

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

if ($this->_align === static::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 814969d

Please sign in to comment.