From 90bc19ec007ede40268b5fe5df38fe29b1b0ece2 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 30 May 2006 11:49:38 +0000 Subject: onClick javascript event triggered twice on CheckBox label --- framework/Web/UI/WebControls/TRadioButton.php | 5 ++++- 1 file changed, 4 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 9a523b55..2ccda96b 100644 --- a/framework/Web/UI/WebControls/TRadioButton.php +++ b/framework/Web/UI/WebControls/TRadioButton.php @@ -139,14 +139,17 @@ class TRadioButton extends TCheckBox * Renders a radiobutton input element. * @param THtmlWriter the writer for the rendering purpose * @param string checkbox id + * @param string onclick js */ - protected function renderInputTag($writer,$clientID) + protected function renderInputTag($writer,$clientID,$onclick) { if($clientID!=='') $writer->addAttribute('id',$clientID); $writer->addAttribute('type','radio'); $writer->addAttribute('name',$this->getUniqueGroupName()); $writer->addAttribute('value',$this->getValueAttribute()); + if($onclick!=='') + $writer->addAttribute('onclick',$onclick); if($this->getChecked()) $writer->addAttribute('checked','checked'); if(!$this->getEnabled(true)) -- cgit v1.2.3