summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2006-01-19 05:16:47 +0000
committerwei <>2006-01-19 05:16:47 +0000
commit1b70c13faf9a6a7e45556ad00b42559ff11c9487 (patch)
treed9f98bfca5c06c68b88a3cb4a161e3e63a49023b
parentc097a2128a3cfc37ef91f7cd09e6b069f305333d (diff)
Allow for multiple forms.
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php8
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();