From 36f2ce766bde98c11d57b889fd9e1a7f8dff6010 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 1 Oct 2006 03:09:18 +0000 Subject: Fixed #350 and #148, Add TActiveRatingList, should remove TRatingList from WebControls. --- framework/Web/UI/WebControls/TRadioButton.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'framework/Web/UI/WebControls/TRadioButton.php') 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 @@ -233,6 +233,22 @@ class TRadioButton extends TCheckBox return $value; } + /** + * @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 @@ -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); -- cgit v1.2.3