From 62a28cab64ac0c967304f611088071f47568d094 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Mon, 20 Oct 2008 10:52:47 +0000 Subject: [PATCH] ENHANCEMENT Clearer indication of setting disabled attribute in DropdownField->Field() since the disabled attribute shouldn't be set if the field isn't to be disabled git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64556 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/DropdownField.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/DropdownField.php b/forms/DropdownField.php index e6c59f043..067b08862 100755 --- a/forms/DropdownField.php +++ b/forms/DropdownField.php @@ -92,9 +92,10 @@ class DropdownField extends FormField { 'class' => trim($this->extraClass()) ? $this->extraClass() : null, 'id' => $this->id(), 'name' => $this->name, - 'disabled' => $this->disabled ? 'disabled' : null, 'tabindex' => $this->getTabIndex() ); + + if($this->disabled) $attributes['disabled'] = 'disabled'; return $this->createTag('select', $attributes, $options); }