login.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /* @var $this yii\web\View */
  3. /* @var $form yii\bootstrap\ActiveForm */
  4. /* @var $model \common\models\LoginForm */
  5. use yii\helpers\Html;
  6. use yii\bootstrap\ActiveForm;
  7. $this->title = '登入';
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="site-login">
  11. <h1><?= Html::encode($this->title) ?></h1>
  12. <p>Please fill out the following fields to login:</p>
  13. <div class="row">
  14. <div class="col-lg-5">
  15. <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
  16. <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
  17. <?= $form->field($model, 'password')->passwordInput() ?>
  18. <?= $form->field($model, 'rememberMe')->checkbox() ?>
  19. <div style="color:#999;margin:1em 0">
  20. If you forgot your password you can <?= Html::a('reset it', ['site/request-password-reset']) ?>.
  21. </div>
  22. <div class="form-group">
  23. <?= Html::submitButton('登入', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?>
  24. </div>
  25. <?php ActiveForm::end(); ?>
  26. </div>
  27. </div>
  28. </div>