Commit 849884269bbb77eb5c7e8d07ee166602baa1c967

Authored by Yarik
1 parent 6dd6c4bf

test

frontend/controllers/SiteController.php
@@ -275,7 +275,7 @@ class SiteController extends Controller @@ -275,7 +275,7 @@ class SiteController extends Controller
275 /** 275 /**
276 * Resets password. 276 * Resets password.
277 * 277 *
278 - * @param string $token 278 + * @param string $tokenre
279 * @return mixed 279 * @return mixed
280 * @throws BadRequestHttpException 280 * @throws BadRequestHttpException
281 */ 281 */
frontend/views/site/login.php
1 <?php 1 <?php
2 -use yii\helpers\Html;  
3 -use yii\widgets\ActiveForm;  
4 -/**  
5 - * @var yii\web\View $this  
6 - * @var yii\widgets\ActiveForm $form  
7 - * @var app\models\LoginForm $model  
8 - */  
9 -$this->title = 'Login';  
10 -$this->params['breadcrumbs'][] = $this->title; 2 + use common\models\LoginForm;
  3 + use yii\helpers\Html;
  4 + use yii\widgets\ActiveForm;
  5 +
  6 + /**
  7 + * @var yii\web\View $this
  8 + * @var yii\widgets\ActiveForm $form
  9 + * @var LoginForm $model
  10 + */
  11 + $this->title = 'Login';
  12 + $this->params[ 'breadcrumbs' ][] = $this->title;
11 ?> 13 ?>
12 -<h1><?php echo Html::encode($this->title); ?></h1> 14 + <h1><?php echo Html::encode($this->title); ?></h1>
13 15
14 <?php 16 <?php
15 - if (Yii::$app->getSession()->hasFlash('error')) {  
16 - echo '<div class="alert alert-danger">'.Yii::$app->getSession()->getFlash('error').'</div>'; 17 + if(Yii::$app->getSession()
  18 + ->hasFlash('error')
  19 + ) {
  20 + echo '<div class="alert alert-danger">' . Yii::$app->getSession()
  21 + ->getFlash('error') . '</div>';
17 } 22 }
18 ?> 23 ?>
19 24
20 -<p class="lead">Do you already have an account on one of these sites? Click the logo to log in with it here:</p>  
21 -<?php echo \nodge\eauth\Widget::widget(array('action' => 'site/login')); ?>  
22 -<hr/> 25 + <p class="lead">Do you already have an account on one of these sites? Click the logo to log in with it here:</p>
  26 +<?php echo \nodge\eauth\Widget::widget([ 'action' => 'site/login' ]); ?>
  27 + <hr/>
23 28
24 -<p>Please fill out the following fields to login:</p> 29 + <p>Please fill out the following fields to login:</p>
25 30
26 -<?php $form = ActiveForm::begin(array('options' => array('class' => 'form-horizontal', 'id' => 'login-form'))); ?>  
27 - <?php echo $form->field($model, 'username')->textInput(); ?>  
28 - <?php echo $form->field($model, 'password')->passwordInput(); ?>  
29 - <?php echo $form->field($model, 'rememberMe')->checkbox(); ?> 31 +<?php $form = ActiveForm::begin([
  32 + 'options' => [
  33 + 'class' => 'form-horizontal',
  34 + 'id' => 'login-form',
  35 + ],
  36 +]); ?>
  37 +<?php echo $form->field($model, 'username')
  38 + ->textInput(); ?>
  39 +<?php echo $form->field($model, 'password')
  40 + ->passwordInput(); ?>
  41 +<?php echo $form->field($model, 'rememberMe')
  42 + ->checkbox(); ?>
30 <div class="form-actions"> 43 <div class="form-actions">
31 - <?php echo Html::submitButton('Login', array('class' => 'btn btn-primary')); ?> 44 + <?php echo Html::submitButton('Login', [ 'class' => 'btn btn-primary' ]); ?>
32 </div> 45 </div>
  46 +<?= Html::a('Восстановить пароль', [ 'site/request-password-reset' ]) ?>
33 <?php ActiveForm::end(); ?> 47 <?php ActiveForm::end(); ?>
34 \ No newline at end of file 48 \ No newline at end of file