Commit b6b48c70968d8300a845d455fc4df710df8724b5
1 parent
39a34915
Commit
Showing
2 changed files
with
18 additions
and
3 deletions
Show diff stats
frontend/controllers/SiteController.php
| @@ -307,14 +307,12 @@ class SiteController extends Controller | @@ -307,14 +307,12 @@ class SiteController extends Controller | ||
| 307 | $model = new PasswordResetRequestForm(); | 307 | $model = new PasswordResetRequestForm(); |
| 308 | if ($model->load(Yii::$app->request->post()) && $model->validate()) { | 308 | if ($model->load(Yii::$app->request->post()) && $model->validate()) { |
| 309 | if ($model->sendEmail()) { | 309 | if ($model->sendEmail()) { |
| 310 | - Yii::$app->session->setFlash('success', 'Check your email for further instructions.'); | ||
| 311 | - | 310 | + Yii::$app->session->setFlash('success', 'Восстановление пароля. Проверьте Ваш Email для дальнейших инструкций.'); |
| 312 | return $this->goHome(); | 311 | return $this->goHome(); |
| 313 | } else { | 312 | } else { |
| 314 | Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for email provided.'); | 313 | Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for email provided.'); |
| 315 | } | 314 | } |
| 316 | } | 315 | } |
| 317 | - | ||
| 318 | return $this->render('requestPasswordResetToken', [ | 316 | return $this->render('requestPasswordResetToken', [ |
| 319 | 'model' => $model, | 317 | 'model' => $model, |
| 320 | ]); | 318 | ]); |
frontend/views/site/index.php
| 1 | <?php | 1 | <?php |
| 2 | + use frontend\assets\CustomizeBootstrapAsset; | ||
| 3 | + use yii\bootstrap\BootstrapPluginAsset; | ||
| 2 | use \yii\helpers\Html; | 4 | use \yii\helpers\Html; |
| 3 | use \common\models\Specialization; | 5 | use \common\models\Specialization; |
| 4 | /** | 6 | /** |
| @@ -7,6 +9,21 @@ | @@ -7,6 +9,21 @@ | ||
| 7 | */ | 9 | */ |
| 8 | $this->title = 'My Yii Application'; | 10 | $this->title = 'My Yii Application'; |
| 9 | ?> | 11 | ?> |
| 12 | +<?php | ||
| 13 | + CustomizeBootstrapAsset::register($this); | ||
| 14 | + BootstrapPluginAsset::register($this); | ||
| 15 | + $success = \Yii::$app->session->removeFlash('success'); | ||
| 16 | + if(!empty( $success )) { | ||
| 17 | + echo Html::tag('div', Html::button(Html::tag('span', '×', [ 'aria-hidden' => true ]), [ | ||
| 18 | + 'class' => 'close', | ||
| 19 | + 'data-dismiss' => 'alert', | ||
| 20 | + 'aria-label' => 'close', | ||
| 21 | + ]).$success, [ | ||
| 22 | + 'class' => 'alert alert-success alert-dismissible fade in', | ||
| 23 | + 'role' => 'alert', | ||
| 24 | + ]); | ||
| 25 | + } | ||
| 26 | +?> | ||
| 10 | <div class="section-box-1"> | 27 | <div class="section-box-1"> |
| 11 | <div class="box-wr"> | 28 | <div class="box-wr"> |
| 12 | <div class="box-all"> | 29 | <div class="box-all"> |