Merge pull request #40 from mango9/master

MINOR: Use setRows() and instead of constructor arguments
This commit is contained in:
Will Rossiter 2012-06-07 21:28:27 -07:00
commit 74eaee0d13

View File

@ -39,7 +39,9 @@ class EditableTextField extends EditableFormField {
*/
public function getFormField() {
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 {
return new TextField($this->Name, $this->Title, null, $this->getSetting('MaxLength'));