diff options
-rw-r--r-- | demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page | 3 | ||||
-rw-r--r-- | framework/Web/UI/WebControls/TCheckBox.php | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page index 381541a0..8b3a2714 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TLabel/Home.page @@ -16,7 +16,7 @@ <div class="samplepanel">
-<com:TLabel
+<com:TLabel ID="Label1"
Text="This is a form label associated with the TTextBox control below."
AssociatedControlID="test"
/>
@@ -38,6 +38,7 @@ This is a label with empty Text property and <b>nonempty body</b>. <com:TLabel
Text="This is a disabled label."
Enabled="false"
+ ID="Label2"
/>
</div>
diff --git a/framework/Web/UI/WebControls/TCheckBox.php b/framework/Web/UI/WebControls/TCheckBox.php index 77145d48..5d3779b9 100644 --- a/framework/Web/UI/WebControls/TCheckBox.php +++ b/framework/Web/UI/WebControls/TCheckBox.php @@ -313,12 +313,12 @@ class TCheckBox extends TWebControl implements IPostBackDataHandler, IValidatabl {
$attributes=$this->getViewState('InputAttributes',null);
if($attributes && $attributes->contains('value'))
- {
$value=$attributes->itemAt('value');
- return $value===''?$this->getUniqueID():$value;
- }
+ else if($this->hasAttribute('value'))
+ $value=$this->getAttribute('value');
else
- return $this->getUniqueID();
+ $value='';
+ return $value===''?$this->getUniqueID():$value;
}
/**
|