summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBaseValidator.php
diff options
context:
space:
mode:
authorxue <>2006-02-18 07:24:51 +0000
committerxue <>2006-02-18 07:24:51 +0000
commit145c4aef09e278d29bfd8e9858e114ca097e5901 (patch)
treef125683e12badb170f9b5c435a811fd4f8eb3942 /framework/Web/UI/WebControls/TBaseValidator.php
parent64a5d4b6d3adaeab325d0e72d6c6c7624d861807 (diff)
client script reorganization.
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index 97ba1a8b..46f031ca 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -156,7 +156,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$scriptKey = "TBaseValidator:$formID";
if($this->getEnableClientScript() && !$scripts->isEndScriptRegistered($scriptKey))
{
- $scripts->registerClientScript('validator');
+ $scripts->registerPradoScript('validator');
$scripts->registerEndScript($scriptKey, "Prado.Validation.AddForm('$formID');");
}
if($this->getEnableClientScript())
@@ -194,8 +194,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$class = get_class($this);
$scriptKey = "prado:".$this->getClientID();
$scripts = $this->getPage()->getClientScript();
- $serializer = new TJavascriptSerializer($this->getClientScriptOptions());
- $options = $serializer->toJavascript();
+ $options = TJavaScript::encode($this->getClientScriptOptions());
$js = "new Prado.Validation(Prado.Validation.{$class}, {$options});";
$scripts->registerEndScript($scriptKey, $js);
}