login.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. use yii\helpers\Html;
  3. ?>
  4. <div class="card">
  5. <div class="card-body login-card-body">
  6. <p class="login-box-msg">Sign in to start your session</p>
  7. <?php $form = \yii\bootstrap4\ActiveForm::begin(['id' => 'login-form']) ?>
  8. <?= $form->field($model,'username', [
  9. 'options' => ['class' => 'form-group has-feedback'],
  10. 'inputTemplate' => '{input}<div class="input-group-append"><div class="input-group-text"><span class="fas fa-envelope"></span></div></div>',
  11. 'template' => '{beginWrapper}{input}{error}{endWrapper}',
  12. 'wrapperOptions' => ['class' => 'input-group mb-3']
  13. ])
  14. ->label(false)
  15. ->textInput(['placeholder' => $model->getAttributeLabel('username')]) ?>
  16. <?= $form->field($model, 'password', [
  17. 'options' => ['class' => 'form-group has-feedback'],
  18. 'inputTemplate' => '{input}<div class="input-group-append"><div class="input-group-text"><span class="fas fa-lock"></span></div></div>',
  19. 'template' => '{beginWrapper}{input}{error}{endWrapper}',
  20. 'wrapperOptions' => ['class' => 'input-group mb-3']
  21. ])
  22. ->label(false)
  23. ->passwordInput(['placeholder' => $model->getAttributeLabel('password')]) ?>
  24. <div class="row">
  25. <div class="col-8">
  26. <?= $form->field($model, 'rememberMe')->checkbox([
  27. 'template' => '<div class="icheck-primary">{input}{label}</div>',
  28. 'labelOptions' => [
  29. 'class' => ''
  30. ],
  31. 'uncheck' => null
  32. ]) ?>
  33. </div>
  34. <div class="col-4">
  35. <?= Html::submitButton('Sign In', ['class' => 'btn btn-primary btn-block']) ?>
  36. </div>
  37. </div>
  38. <?php \yii\bootstrap4\ActiveForm::end(); ?>
  39. <div class="social-auth-links text-center mb-3">
  40. <p>- OR -</p>
  41. <a href="#" class="btn btn-block btn-primary">
  42. <i class="fab fa-facebook mr-2"></i> Sign in using Facebook
  43. </a>
  44. <a href="#" class="btn btn-block btn-danger">
  45. <i class="fab fa-google-plus mr-2"></i> Sign in using Google+
  46. </a>
  47. </div>
  48. <!-- /.social-auth-links -->
  49. <p class="mb-1">
  50. <a href="forgot-password.html">I forgot my password</a>
  51. </p>
  52. <p class="mb-0">
  53. <a href="register.html" class="text-center">Register a new membership</a>
  54. </p>
  55. </div>
  56. <!-- /.login-card-body -->
  57. </div>