Skip to content

Commit

Permalink
Fix missing "for" attribute for datetime input labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Sep 27, 2019
1 parent 0ed805c commit c28ad86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class FormHelper extends Helper
*
* @var string[]
*/
protected $_groupedInputTypes = ['radio', 'multicheckbox', 'date', 'time', 'datetime'];
protected $_groupedInputTypes = ['radio', 'multicheckbox'];

/**
* Construct the widgets and binds the default context providers
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/View/Helper/FormHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3410,7 +3410,7 @@ public function testControlDatetime()
]);
$expected = [
'div' => ['class' => 'input datetime'],
'<label',
'label' => ['for' => 'prueba'],
'Prueba',
'/label',
'input' => ['name' => 'prueba', 'id' => 'prueba', 'type' => 'datetime-local', 'value' => '2019-09-27T02:52:43'],
Expand All @@ -3435,7 +3435,7 @@ public function testControlDatetimeIdPrefix()
]);
$expected = [
'div' => ['class' => 'input datetime'],
'<label',
'label' => ['for' => 'prefix-prueba'],
'Prueba',
'/label',
'input' => ['name' => 'prueba', 'id' => 'prefix-prueba', 'type' => 'datetime-local', 'value' => ''],
Expand Down

0 comments on commit c28ad86

Please sign in to comment.