diff options
author | wei <> | 2006-04-25 01:00:08 +0000 |
---|---|---|
committer | wei <> | 2006-04-25 01:00:08 +0000 |
commit | c84f3e19b54cf54f525f4b2d158696ae32d1bf60 (patch) | |
tree | 60720fba29ef72175db47dd3cd4b74d8bbed605b /framework/Web/UI/WebControls/TBaseValidator.php | |
parent | 09edc6590523e26fffbf32f7b0e7958c166f7537 (diff) |
Add TListControlValidator. Update client-side validators, datepicker.js, colorpicker.js.
Diffstat (limited to 'framework/Web/UI/WebControls/TBaseValidator.php')
-rw-r--r-- | framework/Web/UI/WebControls/TBaseValidator.php | 6 |
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(); |