diff options
author | wei <> | 2006-01-19 05:16:47 +0000 |
---|---|---|
committer | wei <> | 2006-01-19 05:16:47 +0000 |
commit | 1b70c13faf9a6a7e45556ad00b42559ff11c9487 (patch) | |
tree | d9f98bfca5c06c68b88a3cb4a161e3e63a49023b /framework/Web/UI/WebControls | |
parent | c097a2128a3cfc37ef91f7cd09e6b069f305333d (diff) |
Allow for multiple forms.
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php index 0f8167b5..18f5ec7e 100644 --- a/framework/Web/UI/WebControls/TBaseValidator.php +++ b/framework/Web/UI/WebControls/TBaseValidator.php @@ -150,11 +150,11 @@ abstract class TBaseValidator extends TLabel implements IValidator protected function onPreRender($param) { $scripts = $this->getPage()->getClientScript(); - $scriptKey = "TBaseValidator"; + $formID=$this->getPage()->getForm()->getClientID(); + $scriptKey = "TBaseValidator:$formID"; if($this->getEnableClientScript() && !$scripts->isEndScriptRegistered($scriptKey)) { - $scripts->registerClientScript('validator'); - $formID=$this->getPage()->getForm()->getClientID(); + $scripts->registerClientScript('validator'); $js = "Prado.Validation.AddForm('$formID');"; $scripts->registerEndScript($scriptKey, $js); } @@ -168,7 +168,7 @@ abstract class TBaseValidator extends TLabel implements IValidator */ protected function registerClientScriptValidator() { - if($this->getEnabled(true) && $this->getEnableClientScript()) + if($this->getEnabled(true)) { $class = get_class($this); $scriptKey = "prado:".$this->getClientID(); |