Drupal investigation

login.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /* @var $this yii\web\View */
  3. /* @var $form yii\bootstrap\ActiveForm */
  4. /* @var $model app\models\LoginForm */
  5. use yii\helpers\Html;
  6. use yii\bootstrap\ActiveForm;
  7. $this->title = 'Login';
  8. //$this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <style>
  11. body, html {
  12. height: 100%;
  13. background-repeat: no-repeat;
  14. background-image: linear-gradient(rgb(255, 255, 255), rgb(28, 159, 128));
  15. }
  16. .card {
  17. max-width: 420px;
  18. padding: 40px 40px;
  19. margin-right:auto;
  20. margin-left: auto;
  21. margin-top: 200px;
  22. }
  23. </style>
  24. <div class="card">
  25. <div class="col-lg-12"><h1>Login</h1></div>
  26. <?php $form = ActiveForm::begin([
  27. 'id' => 'login-form', 'fieldConfig' => [
  28. 'template' => "<div class=\"col-lg-12\">{label}</div><div class=\"col-lg-12\">{input}</div>\n<div class=\"col-lg-12\">{error}</div>",
  29. ],
  30. ]); ?>
  31. <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?>
  32. <?= $form->field($model, 'password')->passwordInput() ?>
  33. <!--<?= $form->field($model, 'rememberMe')->checkbox([
  34. 'template' => "<div class=\"col-lg-offset-1 col-lg-3\">{input} {label}</div>\n<div class=\"col-lg-8\">{error}</div>",
  35. ])
  36. ?>-->
  37. <div class="form-group">
  38. <!--<div class="col-lg-offset-1 col-lg-11">-->
  39. <?= Html::submitButton('Login', ['class' => 'btn btn-primary center-block', 'name' => 'login-button']) ?>
  40. <!--</div>-->
  41. </div>
  42. <?php ActiveForm::end(); ?>
  43. </div>