Fix double flash messages #384
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
- Fix #380: Avoid rewriting AccessRule::matchRole (maxxer)
|
- Fix #380: Avoid rewriting AccessRule::matchRole (maxxer)
|
||||||
- Fix #378: Add module attribute 'disableIpLogging' (jkmssoft)
|
- Fix #378: Add module attribute 'disableIpLogging' (jkmssoft)
|
||||||
- Enh #387: Added Persian translation (hadi-aj)
|
- Enh #387: Added Persian translation (hadi-aj)
|
||||||
|
- Fix #384: Delete flash messages after consuming (cgsmith)
|
||||||
|
|
||||||
## 1.5.1 April 5, 2020
|
## 1.5.1 April 5, 2020
|
||||||
- Fix #370: Extending view fix (effsoft)
|
- Fix #370: Extending view fix (effsoft)
|
||||||
|
|||||||
@ -67,7 +67,7 @@ registration process.
|
|||||||
|
|
||||||
#### enableFlashMessages (type: `boolean`, default: `true`)
|
#### enableFlashMessages (type: `boolean`, default: `true`)
|
||||||
|
|
||||||
If `true` views will display flash messages.
|
If `true` views will display flash messages. Disable this if you want to handle messages display in your views.
|
||||||
|
|
||||||
#### enableSwitchIdentities (type: `boolean`, default: `true`)
|
#### enableSwitchIdentities (type: `boolean`, default: `true`)
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ use yii\bootstrap\Alert;
|
|||||||
<?php if ($module->enableFlashMessages): ?>
|
<?php if ($module->enableFlashMessages): ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<?php foreach (Yii::$app->session->getAllFlashes() as $type => $message): ?>
|
<?php foreach (Yii::$app->session->getAllFlashes(true) as $type => $message): ?>
|
||||||
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'], true)): ?>
|
<?php if (in_array($type, ['success', 'danger', 'warning', 'info'], true)): ?>
|
||||||
<?= Alert::widget(
|
<?= Alert::widget(
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user