mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Merge pull request #40 from mango9/master
MINOR: Use setRows() and instead of constructor arguments
This commit is contained in:
commit
74eaee0d13
@ -39,7 +39,9 @@ class EditableTextField extends EditableFormField {
|
|||||||
*/
|
*/
|
||||||
public function getFormField() {
|
public function getFormField() {
|
||||||
if($this->getSetting('Rows') && $this->getSetting('Rows') > 1) {
|
if($this->getSetting('Rows') && $this->getSetting('Rows') > 1) {
|
||||||
return new TextareaField($this->Name, $this->Title, $this->getSetting('Rows'));
|
$taf = new TextareaField($this->Name, $this->Title);
|
||||||
|
$taf->setRows($this->getSetting('Rows'));
|
||||||
|
return $taf;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return new TextField($this->Name, $this->Title, null, $this->getSetting('MaxLength'));
|
return new TextField($this->Name, $this->Title, null, $this->getSetting('MaxLength'));
|
||||||
|
Loading…
Reference in New Issue
Block a user