Skip to content

Commit b0ee080

Browse files
authored
ENGCOM-4631: #21779 Adminhtml textarea field doesn't accept maxlength #21816
2 parents 19c7bc9 + df7cce2 commit b0ee080

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lib/internal/Magento/Framework/Data/Form/Element/Textarea.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Form textarea element
9-
*
10-
* @author Magento Core Team <core@magentocommerce.com>
11-
*/
127
namespace Magento\Framework\Data\Form\Element;
138

149
use Magento\Framework\Escaper;
1510

11+
/**
12+
* Form textarea element.
13+
*
14+
* @author Magento Core Team <core@magentocommerce.com>
15+
*/
1616
class Textarea extends AbstractElement
1717
{
1818
/**
@@ -64,6 +64,7 @@ public function getHtmlAttributes()
6464
'rows',
6565
'cols',
6666
'readonly',
67+
'maxlength',
6768
'disabled',
6869
'onkeyup',
6970
'tabindex',

lib/internal/Magento/Framework/Data/Test/Unit/Form/Element/TextareaTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/**
8-
* Tests for \Magento\Framework\Data\Form\Element\Textarea
9-
*/
107
namespace Magento\Framework\Data\Test\Unit\Form\Element;
118

9+
/**
10+
* Tests for \Magento\Framework\Data\Form\Element\Textarea class.
11+
*/
1212
class TextareaTest extends \PHPUnit\Framework\TestCase
1313
{
1414
/**
@@ -76,6 +76,7 @@ public function testGetHtmlAttributes()
7676
'rows',
7777
'cols',
7878
'readonly',
79+
'maxlength',
7980
'disabled',
8081
'onkeyup',
8182
'tabindex',

0 commit comments

Comments
 (0)