From fda6ab0afbe2fd02bb5046bcfde7a92c1186df5a Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 20 Oct 2008 10:54:04 +0000 Subject: [PATCH] MINOR Unnecessary check of trim() twice on TextareaField->Field() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64557 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/TextareaField.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/forms/TextareaField.php b/forms/TextareaField.php index 53f5244c0..5fced5336 100755 --- a/forms/TextareaField.php +++ b/forms/TextareaField.php @@ -38,8 +38,9 @@ class TextareaField extends FormField { if($this->readonly) { $attributes = array( 'id' => $this->id(), - 'class' => 'readonly' . (trim($this->extraClass()) ? (' ' . trim($this->extraClass())) : ''), + 'class' => 'readonly' . (trim($this->extraClass()) ? (' ' . $this->extraClass()) : ''), 'name' => $this->name, + 'tabindex' => $this->getTabIndex(), 'readonly' => 'readonly' ); @@ -47,7 +48,7 @@ class TextareaField extends FormField { } else { $attributes = array( 'id' => $this->id(), - 'class' => (trim($this->extraClass()) ? trim($this->extraClass()) : ''), + 'class' => (trim($this->extraClass()) ? $this->extraClass() : ''), 'name' => $this->name, 'rows' => $this->rows, 'cols' => $this->cols