diff options
author | wei <> | 2006-10-01 03:09:18 +0000 |
---|---|---|
committer | wei <> | 2006-10-01 03:09:18 +0000 |
commit | 36f2ce766bde98c11d57b889fd9e1a7f8dff6010 (patch) | |
tree | 87c33c9e4447e20159932824b4de6167da495d49 /framework/Web/UI/WebControls/TRadioButton.php | |
parent | 1c32172efb18e8d08ea483e2460813670ebfe1a5 (diff) |
Fixed #350 and #148, Add TActiveRatingList, should remove TRatingList from WebControls.
Diffstat (limited to 'framework/Web/UI/WebControls/TRadioButton.php')
-rw-r--r-- | framework/Web/UI/WebControls/TRadioButton.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php index dac194b7..9b6bf794 100644 --- a/framework/Web/UI/WebControls/TRadioButton.php +++ b/framework/Web/UI/WebControls/TRadioButton.php @@ -234,6 +234,22 @@ class TRadioButton extends TCheckBox }
/**
+ * @return boolean whether to render javascript.
+ */
+ public function getEnableClientScript()
+ {
+ return $this->getViewState('EnableClientScript',true);
+ }
+
+ /**
+ * @param boolean whether to render javascript.
+ */
+ public function setEnableClientScript($value)
+ {
+ $this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
+ }
+
+ /**
* Renders a radiobutton input element.
* @param THtmlWriter the writer for the rendering purpose
* @param string checkbox id
@@ -254,8 +270,13 @@ class TRadioButton extends TCheckBox $writer->addAttribute('disabled','disabled');
$page=$this->getPage();
- if($this->getEnabled(true) && $this->getAutoPostBack() && $page->getClientSupportsJavaScript())
+ if($this->getEnabled(true)
+ && $this->getEnableClientScript()
+ && $this->getAutoPostBack()
+ && $page->getClientSupportsJavaScript())
+ {
$this->renderClientControlScript($writer);
+ }
if(($accesskey=$this->getAccessKey())!=='')
$writer->addAttribute('accesskey',$accesskey);
|