diff options
author | xue <> | 2006-02-25 19:12:55 +0000 |
---|---|---|
committer | xue <> | 2006-02-25 19:12:55 +0000 |
commit | 2bea1de69b4c815c8bc6027ef0cf9e14f8352884 (patch) | |
tree | ba5d5cc6536be4d8ab0b8e569e2669caf111e5fe /framework/Web | |
parent | bd93d2fecf1ce96ac9a4f6557335489a6347f509 (diff) |
TValidationSummary font color is set as red by default.
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/UI/WebControls/TValidationSummary.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php index 61a4415c..41362264 100644 --- a/framework/Web/UI/WebControls/TValidationSummary.php +++ b/framework/Web/UI/WebControls/TValidationSummary.php @@ -37,6 +37,16 @@ class TValidationSummary extends TWebControl
{
/**
+ * Constructor.
+ * This method sets the foreground color to red.
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ $this->setForeColor('red');
+ }
+
+ /**
* @return string the display behavior (None, Static, Dynamic) of the error message in a validation summary component.
*/
public function getDisplay()
@@ -50,9 +60,7 @@ class TValidationSummary extends TWebControl */
public function setDisplay($value)
{
- if($value!='None' && $value!='Dynamic')
- $value='Static';
- $this->setViewState('Display',$value,'Static');
+ $this->setViewState('Display',TPropertyValue::ensureEnum($value,'None','Dynamic','Static'),'Static');
}
/**
@@ -196,7 +204,7 @@ class TValidationSummary extends TWebControl if($display==='None' || $display==='Dynamic')
$writer->addStyleAttribute('display','none');
else
- $writer->addStyleAttribute('visibility','hidden');
+ $writer->addStyleAttribute('visibility','hidden');
}
$writer->addAttribute('id',$this->getClientID());
parent::addAttributesToRender($writer);
|