summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TBaseValidator.php
diff options
context:
space:
mode:
authorxue <>2006-04-25 01:31:43 +0000
committerxue <>2006-04-25 01:31:43 +0000
commit5ba6cd4be568f686d890835a77586077cde1a943 (patch)
tree54138a79e147bcfb0f6833d2d284a2f825c18f2a /framework/Web/UI/WebControls/TBaseValidator.php
parent1afc913c386bba8e6072c278b0eb4fd9818ab310 (diff)
Merge from 3.0 branch till 967.
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index c5b5e7a5..adbc85ae 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -131,6 +131,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
*/
protected function getClientScriptOptions()
{
+ $control = $this->getValidationTarget();
$options['ID'] = $this->getClientID();
$options['FormID'] = $this->getPage()->getForm()->getClientID();
$options['Display'] = $this->getDisplay();
@@ -141,8 +142,9 @@ abstract class TBaseValidator extends TLabel implements IValidator
$options['FocusElementID'] = $this->getFocusElementID();
}
$options['ValidationGroup'] = $this->getValidationGroup();
- $options['ControlToValidate'] = $this->getValidationTarget()->getClientID();
+ $options['ControlToValidate'] = $control->getClientID();
$options['ControlCssClass'] = $this->getControlCssClass();
+ $options['ControlType'] = get_class($control);
return $options;
}
@@ -163,7 +165,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$manager['FormID'] = $formID;
$options = TJavaScript::encode($manager);
$scripts->registerPradoScript('validator');
- $scripts->registerEndScript($scriptKey, "new Prado.Validation({$options});");
+ $scripts->registerEndScript($scriptKey, "new Prado.ValidationManager({$options});");
}
if($this->getEnableClientScript())
$this->registerClientScriptValidator();