mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Readonly class added in performreadonly function
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44374 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6a9e104006
commit
eda727dacc
@ -24,11 +24,15 @@ class TextareaField extends FormField {
|
||||
* Returns a <textarea> tag - used in templates.
|
||||
*/
|
||||
function Field() {
|
||||
if($extraClass = trim($this->extraClass())) {
|
||||
$classAttr = "class=\"$extraClass\"";
|
||||
} else {
|
||||
$classAttr = '';
|
||||
$classAttr = '';
|
||||
if( $this->readonly ) {
|
||||
$classAttr .= 'class="readonly';
|
||||
if( $extraClass = trim( $this->extraClass() ) )
|
||||
$classAttr .= " $extraClass";
|
||||
$classAttr .= '"';
|
||||
}
|
||||
else if( $extraClass = trim( $this->extraClass() ) )
|
||||
$classAttr .= 'class="' . $extraClass . '"';
|
||||
|
||||
$disabled = $this->disabled ? " disabled=\"disabled\"" : "";
|
||||
$readonly = $this->readonly ? " readonly=\"readonly\"" : "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user