summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TValidationSummary.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/TValidationSummary.php')
-rw-r--r--framework/Web/UI/WebControls/TValidationSummary.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TValidationSummary.php b/framework/Web/UI/WebControls/TValidationSummary.php
index 14cf869d..0ac7584a 100644
--- a/framework/Web/UI/WebControls/TValidationSummary.php
+++ b/framework/Web/UI/WebControls/TValidationSummary.php
@@ -213,6 +213,12 @@ class TValidationSummary extends TWebControl
return $validators;
}
+ protected function addAttributesToRender($writer)
+ {
+ $writer->addAttribute('id',$this->getClientID());
+ parent::addAttributesToRender($writer);
+ }
+
/**
* Render the javascript for validation summary.
* @param array list of options for validation summary.
@@ -221,7 +227,8 @@ class TValidationSummary extends TWebControl
{
if(!$this->getEnabled(true) || !$this->getEnableClientScript())
return;
- $options = TJavascript::toList($this->getClientScriptOptions());
+ $serializer = new TJavascriptSerializer($this->getClientScriptOptions());
+ $options = $serializer->toJavascript();
$script = "new Prado.Validation.Summary({$options});";
$this->getPage()->getClientScript()->registerEndScript($this->getClientID(), $script);
}