From b6b48c70968d8300a845d455fc4df710df8724b5 Mon Sep 17 00:00:00 2001 From: yarik Date: Wed, 6 Jul 2016 14:15:15 +0300 Subject: [PATCH] Commit --- frontend/controllers/SiteController.php | 4 +--- frontend/views/site/index.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index bddfdd5..3b17c13 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -307,14 +307,12 @@ class SiteController extends Controller $model = new PasswordResetRequestForm(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { if ($model->sendEmail()) { - Yii::$app->session->setFlash('success', 'Check your email for further instructions.'); - + Yii::$app->session->setFlash('success', 'Восстановление пароля. Проверьте Ваш Email для дальнейших инструкций.'); return $this->goHome(); } else { Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for email provided.'); } } - return $this->render('requestPasswordResetToken', [ 'model' => $model, ]); diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index baf45b8..7460194 100755 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -1,4 +1,6 @@ title = 'My Yii Application'; ?> +session->removeFlash('success'); + if(!empty( $success )) { + echo Html::tag('div', Html::button(Html::tag('span', '×', [ 'aria-hidden' => true ]), [ + 'class' => 'close', + 'data-dismiss' => 'alert', + 'aria-label' => 'close', + ]).$success, [ + 'class' => 'alert alert-success alert-dismissible fade in', + 'role' => 'alert', + ]); + } +?>
-- libgit2 0.21.4