From 2d91f2f456c688b59223b8965e627cb590260d67 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Mon, 7 May 2012 17:07:32 +1200 Subject: [PATCH] Minor Setting rows and cols on TextField the non deprecated way --- code/model/formfields/EditableLiteralField.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/model/formfields/EditableLiteralField.php b/code/model/formfields/EditableLiteralField.php index fa38427..e56f737 100644 --- a/code/model/formfields/EditableLiteralField.php +++ b/code/model/formfields/EditableLiteralField.php @@ -14,11 +14,16 @@ class EditableLiteralField extends EditableFormField { static $plural_name = 'HTML Blocks'; public function getFieldConfiguration() { + + $textAreaField = new TextareaField( + $this->getSettingName('Content'), + "HTML" + ); + $textAreaField->setRows(4); + $textAreaField->setColumns(20); + return new FieldList( - new TextareaField( - $this->getSettingName('Content'), - "HTML", 4, 20, $this->getSetting('Content') - ), + $textAreaField, new CheckboxField( $this->getSettingName('HideFromReports'), _t('EditableLiteralField.HIDEFROMREPORT', 'Hide from reports?'),