summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActiveCheckBox.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActiveCheckBox.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActiveCheckBox.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/framework/Web/UI/ActiveControls/TActiveCheckBox.php b/framework/Web/UI/ActiveControls/TActiveCheckBox.php
index 2f60d9fb..777ff6ad 100644
--- a/framework/Web/UI/ActiveControls/TActiveCheckBox.php
+++ b/framework/Web/UI/ActiveControls/TActiveCheckBox.php
@@ -111,10 +111,24 @@ class TActiveCheckBox extends TCheckBox implements ICallbackEventHandler, IActiv
}
/**
- * Registers the javascript code for initializing the active control.
+ * Override parent implementation, no javascript is rendered here instead
+ * the javascript required for active control is registered in {@link addAttributesToRender}.
*/
protected function renderClientControlScript($writer)
{
+ }
+
+ /**
+ * Ensure that the ID attribute is rendered and registers the javascript code
+ * for initializing the active control.
+ * @param THtmlWriter the writer for the rendering purpose
+ * @param string checkbox id
+ * @param string onclick js
+ */
+ protected function renderInputTag($writer,$clientID,$onclick)
+ {
+ parent::renderInputTag($writer,$clientID,$onclick);
+ $writer->addAttribute('id',$this->getClientID());
$this->getActiveControl()->registerCallbackClientScript(
$this->getClientClassName(), $this->getPostBackOptions());
}