summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes/ccheckbox.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-12 09:36:25 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-12 09:36:25 +0000
commite47313ccd3ff34c15eb02b02baa02c82995ba06e (patch)
treed704410614098dc2d5e5facb8ba2984221987333 /frontends/php/include/classes/ccheckbox.inc.php
parent75e95637ab623be33a6516918f688b67afac7ec0 (diff)
downloadzabbix-e47313ccd3ff34c15eb02b02baa02c82995ba06e.tar.gz
zabbix-e47313ccd3ff34c15eb02b02baa02c82995ba06e.tar.xz
zabbix-e47313ccd3ff34c15eb02b02baa02c82995ba06e.zip
- Frontend improvements. (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2520 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/ccheckbox.inc.php')
-rw-r--r--frontends/php/include/classes/ccheckbox.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontends/php/include/classes/ccheckbox.inc.php b/frontends/php/include/classes/ccheckbox.inc.php
index 0da3295e..5f492dd0 100644
--- a/frontends/php/include/classes/ccheckbox.inc.php
+++ b/frontends/php/include/classes/ccheckbox.inc.php
@@ -22,13 +22,14 @@
class CCheckBox extends CTag
{
/* public */
- function CCheckBox($name='checkbox',$value=NULL)
+ function CCheckBox($name='checkbox',$value=NULL,$checked="no")
{
parent::CTag("input","no");
$this->tag_body_start = "";
$this->AddOption('type','checkbox');
$this->SetName($name);
$this->SetCaption($value);
+ $this->SetChecked($checked);
}
function SetName($value='checkbox')
{
@@ -46,5 +47,13 @@
return $this->AddItem(nbsp($value));
return $this->error("Incorrect value for SetCaption [$value]");
}
+ function SetChecked($value="yes")
+ {
+ if($value=="yes")
+ return $this->AddOption("checked","checked");
+ elseif($value=="no")
+ return $this->DelOption("checked");
+ return $this->error("Incorrect value for SetChacked [$value]");
+ }
}
?>