ENHANCEMENT If TextField->disabled has been set to true, then add the "disabled" attribute to the input type text attribute list

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64552 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-10-20 10:18:25 +00:00
parent f5a39b5c2c
commit 2fd43fccfa

View File

@ -27,6 +27,8 @@ class TextField extends FormField {
'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null 'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null
); );
if($this->disabled) $attributes['disabled'] = 'disabled';
return $this->createTag('input', $attributes); return $this->createTag('input', $attributes);
} }