login.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2017-03-15 21:16
  7. */
  8. /* @var $this yii\web\View */
  9. /* @var $form \yii\bootstrap\ActiveForm*/
  10. /* @var $model \frontend\models\form\LoginForm */
  11. use yii\helpers\Html;
  12. use yii\bootstrap\ActiveForm;
  13. $this->title = Yii::t('app', 'Login') . '-' . Yii::$app->feehi->website_title;
  14. $this->params['breadcrumbs'][] = $this->title;
  15. ?>
  16. <div class="content-wrap">
  17. <div class="fill">
  18. <h1><?= Html::encode($this->title) ?></h1>
  19. <div class="marginTop">
  20. <?php $form = ActiveForm::begin(['id' => 'form-login']); ?>
  21. <ul class="formInput">
  22. <?= $form->field($model, 'username', ['template' => "<li class='item'>{label}{input}\n{error}\n{hint}</li>", 'labelOptions'=>['class'=>'col-sm-4 control-label'], 'options'=>['class'=>'row'], 'inputOptions'=>['class'=>'col-sm-8']])->textInput(['autofocus' => true]) ?>
  23. <?= $form->field($model, 'password', ['template' => "<li class='item'>{label}{input}\n{error}\n{hint}</li>", 'labelOptions'=>['class'=>'col-sm-4 control-label'], 'options'=>['class'=>'row'], 'inputOptions'=>['class'=>'col-sm-8']])->passwordInput() ?>
  24. </ul>
  25. <div style="clear:both;"></div>
  26. <div class="form-group" style="text-align: center">
  27. <?= $form->field($model, 'rememberMe', ['template'=>'{label}{input}'])->error(false)->checkbox()?>
  28. <span style="display: block;text-align: right"><?= Yii::t('frontend', 'If you forgot your password you can') ?> <?= Html::a(Yii::t('frontend', 'reset it'), ['site/request-password-reset']) ?></span>
  29. </div>
  30. <div class="submitButton">
  31. <?= Html::submitButton(Yii::t('frontend', 'Login'), ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
  32. </div>
  33. <?php ActiveForm::end(); ?>
  34. </div>
  35. </div>
  36. </div>