mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
API: add TextField_Disabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64323 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a574ac1fc8
commit
19d5b377a8
@ -37,4 +37,22 @@ class TextField extends FormField {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class TextField_Disabled extends TextField{
|
||||||
|
function Field() {
|
||||||
|
$attributes = $attributes = array(
|
||||||
|
'type' => 'text',
|
||||||
|
'class' => $this->extraClass() . ' text',
|
||||||
|
'id' => $this->id(),
|
||||||
|
'name' => $this->Name(),
|
||||||
|
'value' => $this->Value(),
|
||||||
|
'tabindex' => $this->getTabIndex(),
|
||||||
|
'maxlength' => ($this->maxLength) ? $this->maxLength : null,
|
||||||
|
'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null,
|
||||||
|
'disabled' => 'disabled'
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this->createTag('input', $attributes);
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user