From 2bea1de69b4c815c8bc6027ef0cf9e14f8352884 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sat, 25 Feb 2006 19:12:55 +0000 Subject: TValidationSummary font color is set as red by default. --- .../Controls/Samples/TValidationSummary/Home.page | 26 +++++++++++----------- .../Web/UI/WebControls/TValidationSummary.php | 16 +++++++++---- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page index 5ac143ae..b345dfcc 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TValidationSummary/Home.page @@ -7,33 +7,33 @@ Create New Account
- Username: + Username: + Text="*" + ErrorMessage="a username is required." />
Password +
- - +
- @@ -48,7 +48,7 @@
Login Name: - +
- setForeColor('red'); + } + /** * @return string the display behavior (None, Static, Dynamic) of the error message in a validation summary component. */ @@ -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); -- cgit v1.2.3