diff options
Diffstat (limited to 'frontends/php/include/classes')
| -rw-r--r-- | frontends/php/include/classes/ccheckbox.inc.php | 10 | ||||
| -rw-r--r-- | frontends/php/include/classes/cformtable.inc.php | 7 |
2 files changed, 6 insertions, 11 deletions
diff --git a/frontends/php/include/classes/ccheckbox.inc.php b/frontends/php/include/classes/ccheckbox.inc.php index 78be0b90..ebe43d93 100644 --- a/frontends/php/include/classes/ccheckbox.inc.php +++ b/frontends/php/include/classes/ccheckbox.inc.php @@ -22,14 +22,14 @@ class CCheckBox extends CTag { /* public */ - function CCheckBox($name='checkbox',$value=NULL,$checked="no",$action=NULL) + function CCheckBox($name='checkbox',$value='no',$caption=NULL,$action=NULL) { parent::CTag("input","no"); $this->tag_body_start = ""; $this->AddOption('type','checkbox'); $this->SetName($name); - $this->SetCaption($value); - $this->SetChecked($checked); + $this->SetCaption($caption); + $this->SetChecked($value); $this->SetAction($action); } function SetName($value='checkbox') @@ -50,9 +50,9 @@ } function SetChecked($value="yes") { - if($value=="yes" || $value=="checked" || $value=="on") + if($value=="yes" || $value=="checked" || $value=="on" || $value==1) return $this->AddOption("checked","checked"); - elseif($value=="no" || $value=="unchecked" || $value=="off" || $value==NULL) + elseif($value=="no" || $value=="unchecked" || $value=="off" || $value==NULL || $value==0) return $this->DelOption("checked"); return $this->error("Incorrect value for SetChacked [$value]"); } diff --git a/frontends/php/include/classes/cformtable.inc.php b/frontends/php/include/classes/cformtable.inc.php index 699a7d2d..3af7acae 100644 --- a/frontends/php/include/classes/cformtable.inc.php +++ b/frontends/php/include/classes/cformtable.inc.php @@ -39,12 +39,7 @@ $this->SetAlign('center'); $this->SetHelp(); - if(isset($_REQUEST["form"]) && is_string($_REQUEST["form"])) - $this->AddVar("form",$_REQUEST["form"]); - elseif(isset($title) && is_string($title)) - $this->AddVar("form",$title); - else - $this->AddVar("form","form"); + $this->AddVar("form","1"); $this->bottom_items = new CCol(NULL,'form_row_last'); $this->bottom_items->SetColSpan(2); |
