mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
f5a39b5c2c
commit
2fd43fccfa
@ -27,6 +27,8 @@ class TextField extends FormField {
|
||||
'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null
|
||||
);
|
||||
|
||||
if($this->disabled) $attributes['disabled'] = 'disabled';
|
||||
|
||||
return $this->createTag('input', $attributes);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user