summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/UI/WebControls/TBaseValidator.php10
-rw-r--r--framework/Web/UI/WebControls/TCustomValidator.php4
3 files changed, 8 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 360f7a89..e8dd1f00 100644
--- a/HISTORY
+++ b/HISTORY
@@ -19,6 +19,7 @@ ENH: Updated to scriptaculous 1.8.2 & Prototype 1.6.0.3
ENH: replace is_null() function calls with native language constuct (Yves)
ENH: replace array_push() function calls with native language constuct if make sense (Yves)
ENH: TBrowserLogRoute: add table-layout:auto and explicit set column with to avoid bad render behavior in table-layout:fixed environment, explicit set text color to increase readability (Yves)
+ENH: TBaseValidator, TCustomValidator: change visibilty (protected => public) of getValidationTarget() (Yves)
Version 3.1.4 January 11, 2009
BUG: Issue#9 - Global page properties are ignored when using external configuration (Christophe)
diff --git a/framework/Web/UI/WebControls/TBaseValidator.php b/framework/Web/UI/WebControls/TBaseValidator.php
index e276bb55..6daae4d0 100644
--- a/framework/Web/UI/WebControls/TBaseValidator.php
+++ b/framework/Web/UI/WebControls/TBaseValidator.php
@@ -246,15 +246,15 @@ abstract class TBaseValidator extends TLabel implements IValidator
}
/**
- * Override parent implementation to update the control CSS Class before
- * the validated control is rendered
+ * Override parent implementation to update the control CSS Class before
+ * the validated control is rendered
*/
public function onPreRender ($param)
{
parent::onPreRender($param);
$this->updateControlCssClass();
}
-
+
/**
* Update the ControlToValidate component's css class depending
* if the ControlCssClass property is set, and whether this is valid.
@@ -464,7 +464,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
* @throws TConfigurationException if {@link getControlToValidate
* ControlToValidate} is empty or does not point to a valid control
*/
- protected function getValidationTarget()
+ public function getValidationTarget()
{
if(($id=$this->getControlToValidate())!=='' && ($control=$this->findControl($id))!==null)
return $control;
@@ -496,7 +496,7 @@ abstract class TBaseValidator extends TLabel implements IValidator
$this->setIsValid(true);
$this->onValidate();
if($this->getVisible(true) && $this->getEnabled(true))
- {
+ {
// if the target is not a disabled web control
if(($target=$this->getValidationTarget())!==null && !($target instanceof TWebControl && !$target->getEnabled(true)))
{
diff --git a/framework/Web/UI/WebControls/TCustomValidator.php b/framework/Web/UI/WebControls/TCustomValidator.php
index 0b82ac5c..7fed2b84 100644
--- a/framework/Web/UI/WebControls/TCustomValidator.php
+++ b/framework/Web/UI/WebControls/TCustomValidator.php
@@ -112,11 +112,11 @@ class TCustomValidator extends TBaseValidator
else
return $param->getIsValid();
}
-
+
/**
* @return TControl control to be validated. Null if no control is found.
*/
- protected function getValidationTarget()
+ public function getValidationTarget()
{
if(($id=$this->getControlToValidate())!=='' && ($control=$this->findControl($id))!==null)
return $control;