summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TCheckBox.php
diff options
context:
space:
mode:
authorxue <>2006-04-22 12:51:57 +0000
committerxue <>2006-04-22 12:51:57 +0000
commitb181cd60a8fff5a94179f66fa1165952ed170a95 (patch)
tree839849817048badd43cdbc68f6482c21a1a5ba06 /framework/Web/UI/WebControls/TCheckBox.php
parentd29f65df2bc5ce4cf294f687e90a02229bc35356 (diff)
Modified default value rendering for TCheckBox.
Diffstat (limited to 'framework/Web/UI/WebControls/TCheckBox.php')
-rw-r--r--framework/Web/UI/WebControls/TCheckBox.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php
index c3e5e640..ff7f57f7 100644
--- a/framework/Web/UI/WebControls/TCheckBox.php
+++ b/framework/Web/UI/WebControls/TCheckBox.php
@@ -307,12 +307,11 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
{
$attributes=$this->getViewState('InputAttributes',null);
if($attributes && $attributes->contains('value'))
- $value=$attributes->itemAt('value');
+ return $attributes->itemAt('value');
else if($this->hasAttribute('value'))
- $value=$this->getAttribute('value');
+ return $this->getAttribute('value');
else
- $value='';
- return $value===''?$this->getUniqueID():$value;
+ return '';
}
/**
@@ -341,7 +340,8 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl
if($clientID!=='')
$writer->addAttribute('id',$clientID);
$writer->addAttribute('type','checkbox');
- $writer->addAttribute('value',$this->getValueAttribute());
+ if(($value=$this->getValueAttribute())!=='')
+ $writer->addAttribute('value',$value);
if(($uniqueID=$this->getUniqueID())!=='')
$writer->addAttribute('name',$uniqueID);
if($this->getChecked())