diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-02-03 08:58:45 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-02-03 08:58:45 +0000 |
| commit | 1f829e896d022a4ed202d443d127346d26cbf7f2 (patch) | |
| tree | f94630ee96cae994e22450e96848a5d61193a018 /frontends/php/include/classes | |
| parent | 9d8c5c8048b648f6b92c51ac96cd3001f55c6253 (diff) | |
- Frontend improvements (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2602 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
| -rw-r--r-- | frontends/php/include/classes/ctextarea.inc.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/frontends/php/include/classes/ctextarea.inc.php b/frontends/php/include/classes/ctextarea.inc.php index d1d605e8..08277878 100644 --- a/frontends/php/include/classes/ctextarea.inc.php +++ b/frontends/php/include/classes/ctextarea.inc.php @@ -24,7 +24,7 @@ /* private */ var $caption; /* public */ - function CTextArea($name='textarea',$value="",$cols=77,$rows=7,$caption=NULL) + function CTextArea($name='textarea',$value="",$cols=77,$rows=7,$caption=NULL,$readonly='no') { parent::CTag("textarea","yes"); $this->SetClass("biginput"); @@ -34,6 +34,7 @@ $this->SetRows($rows); $this->SetCaption($caption); $this->SetValue($value); + $this->SetReadonly($readonly); } function Show() { @@ -61,6 +62,17 @@ } return 0; } + function SetReadonly($value='yes') + { + if(is_string($value)) + { + if($value=='no') + return $this->DelOption("readonly"); + elseif($value=='yes') + return $this->AddOption("readonly",'readonly'); + } + return $this->error("Incorrect value for SetReadonly [$value]"); + } function SetValue($value="") { if(!is_string($value)) |
