Commit 748007ce by Serge Postrash Committed by Alexander Makarov

Fixes #6404: advanced application template `Alert` widget was generating…

Fixes #6404: advanced application template `Alert` widget was generating duplicate IDs in case of multiple flashes
parent 42d26e48
......@@ -58,12 +58,12 @@ class Alert extends \yii\bootstrap\Widget
foreach ($flashes as $type => $data) {
if (isset($this->alertTypes[$type])) {
$data = (array) $data;
foreach ($data as $message) {
foreach ($data as $i => $message) {
/* initialize css class for each alert box */
$this->options['class'] = $this->alertTypes[$type] . $appendCss;
/* assign unique id to each alert box */
$this->options['id'] = $this->getId() . '-' . $type;
$this->options['id'] = $this->getId() . '-' . $type . '-' . $i;
echo \yii\bootstrap\Alert::widget([
'body' => $message,
......
......@@ -4,7 +4,7 @@ Yii Framework 2 Change Log
2.0.2 under development
-----------------------
- no changes in this release.
- Bug #6404: advanced application template `Alert` widget was generating duplicate IDs in case of multiple flashes (SDKiller)
2.0.1 December 07, 2014
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment