summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/Javascripts/source/prado/validator/validation3.js3
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php3
3 files changed, 5 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index df1f7c1d..c5a662f9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5,6 +5,7 @@ BUG: Issue#189 - Page State corrupted when EnableStateValidation=False (Christop
BUG: Issue#198 - "Undefined variable: tagName" after error in application configuration. (Christophe)
BUG: Typo in TBoundColumn (Robin)
ENH: Add property ClientScriptManagerClass to TPageService and releated changes in TPage.getClientScript() (Yves)
+ENH: Always render clientside counterparts of validation control even if not enabled, but pass-through Enabled property, to allow Enabled/Disable of validator on callback. (Yves)
Version 3.1.6 July 22, 2009
BUG: Issue#98 - Missing file in quickstart demo (Chrisotphe)
diff --git a/framework/Web/Javascripts/source/prado/validator/validation3.js b/framework/Web/Javascripts/source/prado/validator/validation3.js
index 18b1d0c2..4e799677 100644
--- a/framework/Web/Javascripts/source/prado/validator/validation3.js
+++ b/framework/Web/Javascripts/source/prado/validator/validation3.js
@@ -795,7 +795,7 @@ Prado.WebUI.TBaseValidator.prototype =
* Wether the validator is enabled (default true)
* @var {boolean} enabled
*/
- this.enabled = true;
+ this.enabled = options.Enabled;
/**
* Visibility state of validator(default false)
* @var {boolean} visible
@@ -837,6 +837,7 @@ Prado.WebUI.TBaseValidator.prototype =
* @var {element} message
*/
this.message = $(options.ID);
+
Prado.Registry.set(options.ID, this);
if(this.control && this.message)
{
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index 6daae4d0..0c71f46d 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -167,6 +167,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$options['ControlCssClass'] = $this->getControlCssClass();
$options['ControlType'] = $this->getClientControlClass($control);
+ $options['Enabled'] = $this->getEnabled(true);
//get date format from date picker target control
if($control instanceof TDatePicker)
@@ -241,7 +242,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$scripts->registerPradoScript('validator');
$scripts->registerEndScript($scriptKey, "new Prado.ValidationManager({$options});");
}
- if($this->getEnableClientScript() & $this->getEnabled(true))
+ if($this->getEnableClientScript())
$this->registerClientScriptValidator();
}