From 1b70c13faf9a6a7e45556ad00b42559ff11c9487 Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 19 Jan 2006 05:16:47 +0000 Subject: Allow for multiple forms. --- framework/Web/UI/WebControls/TBaseValidator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'framework/Web/UI') 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(); -- cgit v1.2.3