diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-12 14:23:12 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-12 14:23:12 +0000 |
| commit | 4182bc6afb20b00fa27a54c67056bb98a58a49bb (patch) | |
| tree | 5cab17d23e387cc3b6e8c92e4c928ac5e1111b76 /frontends/php/include/classes/ctextbox.inc.php | |
| parent | 6a6ac0772b8215bffc5fe8b02fc1033dbf273f41 (diff) | |
| download | zabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.tar.gz zabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.tar.xz zabbix-4182bc6afb20b00fa27a54c67056bb98a58a49bb.zip | |
- speed improvement for Overview screens (Eugene)
- developed 'net.if.total[*]' parameter (Eugene)
- fixed new map link adding (Eugene)
- fixed host group adding (Eugene)
- fixed map displaying (Eugene)
- fixed 'No permissions' for 'Latest data','Triggers','Alarms' screens (Eugene)
- fixed permision deletion (Eugene)
- fixed 'get_map_by_sysmapid' function calls(Eugene)
- improved php code execution speed (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2825 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/ctextbox.inc.php')
| -rw-r--r-- | frontends/php/include/classes/ctextbox.inc.php | 78 |
1 files changed, 23 insertions, 55 deletions
diff --git a/frontends/php/include/classes/ctextbox.inc.php b/frontends/php/include/classes/ctextbox.inc.php index 6345b342..b8faf48a 100644 --- a/frontends/php/include/classes/ctextbox.inc.php +++ b/frontends/php/include/classes/ctextbox.inc.php @@ -24,73 +24,41 @@ /* private */ var $caption; /* public */ - function CTextBox($name='textbox',$value="",$size=20,$caption=NULL,$readonly="no") + function CTextBox($name='textbox',$value="",$size=20,$readonly="no") { - parent::CTag("input","no"); - $this->SetClass("biginput"); - $this->SetName($name); - $this->SetSize($size); - $this->SetCaption($caption); - $this->SetValue($value); + parent::CTag('input','no'); + $this->options['class'] = 'biginput'; + $this->options['name'] = $name; + $this->options['size'] = $size; + $this->options['value'] = $value; $this->SetReadonly($readonly); } - function Show() - { - if(isset($this->caption)) - echo $this->caption." "; - parent::Show(); - } 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 SetName($value='textbox') - { - if(!is_string($value)) - { - return $this->error("Incorrect value for SetName [$value]"); - } - return $this->AddOption("name",$value); - } - function SetCaption($value=NULL) - { - if(is_null($value)) - unset($this->caption); - elseif(is_string($value)) - $this->caption = $value; - else - { - return $this->error("Incorrect value for SetCaption [$value]"); - } - return 0; + if($value=='yes') + return $this->options['readonly'] = 'readonly'; + + $this->DelOption('readonly'); } function SetValue($value=NULL) { - if(is_null($value)) $value=""; - - if(is_numeric($value)) $value = strval($value); - - if(is_string($value)) - { - return $this->AddOption("value",$value); - } - return $this->error("Incorrect value for SetValue [$value]"); + $this->options['value'] = $value; } function SetSize($value) { - if(!is_numeric($value)) - { - return $this->error("Incorrect value for SetSize [$value]"); - } - return $this->AddOption("size",strval($value)); + $this->options['size'] = $value; } } + + class CPassBox extends CTextBox + { +/* public */ + function CPassBox($name='password',$value='',$size=20) + { + parent::CTextBox($name,$value,$size); + $this->options['type'] = 'password'; + } + } + ?> |
