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.
|
* Returns a <textarea> tag - used in templates.
|
||||||
*/
|
*/
|
||||||
function Field() {
|
function Field() {
|
||||||
if($extraClass = trim($this->extraClass())) {
|
$classAttr = '';
|
||||||
$classAttr = "class=\"$extraClass\"";
|
if( $this->readonly ) {
|
||||||
} else {
|
$classAttr .= 'class="readonly';
|
||||||
$classAttr = '';
|
if( $extraClass = trim( $this->extraClass() ) )
|
||||||
|
$classAttr .= " $extraClass";
|
||||||
|
$classAttr .= '"';
|
||||||
}
|
}
|
||||||
|
else if( $extraClass = trim( $this->extraClass() ) )
|
||||||
|
$classAttr .= 'class="' . $extraClass . '"';
|
||||||
|
|
||||||
$disabled = $this->disabled ? " disabled=\"disabled\"" : "";
|
$disabled = $this->disabled ? " disabled=\"disabled\"" : "";
|
||||||
$readonly = $this->readonly ? " readonly=\"readonly\"" : "";
|
$readonly = $this->readonly ? " readonly=\"readonly\"" : "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user