Fix tests

This commit is contained in:
Saophalkun Ponlu 2017-12-08 09:58:52 +13:00
parent 442f2bb762
commit 381ad756f2
3 changed files with 22 additions and 8 deletions

View File

@ -134,16 +134,22 @@ class TextareaField extends FormField
*/
public function getAttributes()
{
return array_merge(
$attributes = array_merge(
parent::getAttributes(),
array(
'rows' => $this->getRows(),
'cols' => $this->getColumns(),
'value' => null,
'type' => null,
'maxlength' => $this->getMaxLength(),
)
);
$maxLength = $this->getMaxLength();
if($maxLength) {
$attributes['maxlength'] = $maxLength;
}
return $attributes;
}

View File

@ -31,7 +31,9 @@
"autoFocus": false,
"customValidationMessage": "",
"attributes": [],
"data": [],
"data": {
"maxlength": null
},
"validation": []
},
{

View File

@ -30,7 +30,6 @@
"disabled": false,
"autoFocus": false,
"customValidationMessage": "",
"maxLength": 40,
"validation": {
"required": true,
"max": {
@ -38,7 +37,9 @@
}
},
"attributes": [],
"data": []
"data": {
"maxlength": 40
}
},
{
"name": "Date",
@ -65,7 +66,8 @@
"data": {
"html5": true,
"min": null,
"max": null
"max": null,
"maxlength": null
}
},
{
@ -89,7 +91,9 @@
"numeric": true
},
"attributes": [],
"data": []
"data": {
"maxlength": null
}
},
{
"name": "Money",
@ -112,7 +116,9 @@
"currency": true
},
"attributes": [],
"data": []
"data": {
"maxlength": null
}
},
{
"name": "SecurityID",