You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?= $this->extend('templates/base') ?>
  2. <!-- title -->
  3. <?= $this->section('title') ?>Login<?= $this->endSection() ?>
  4. <!-- content -->
  5. <?= $this->section('content') ?>
  6. <div class="container">
  7. <div class="row">
  8. <div class="col-sm-6 offset-sm-3">
  9. <div class="card">
  10. <h2 class="card-header"><?= lang('Auth.loginTitle') ?></h2>
  11. <div class="card-body">
  12. <?= view('Myth\Auth\Views\_message_block') ?>
  13. <form action="<?= route_to('login') ?>" method="post">
  14. <?= csrf_field() ?>
  15. <?php if ($config->validFields === ['email']) : ?>
  16. <div class="form-group">
  17. <label for="login"><?= lang('Auth.email') ?></label>
  18. <input type="email" class="form-control <?php if (session('errors.login')) : ?>is-invalid<?php endif ?>" name="login" placeholder="<?= lang('Auth.email') ?>">
  19. <div class="invalid-feedback">
  20. <?= session('errors.login') ?>
  21. </div>
  22. </div>
  23. <?php else : ?>
  24. <div class="form-group">
  25. <label for="login"><?= lang('Auth.emailOrUsername') ?></label>
  26. <input type="text" class="form-control <?php if (session('errors.login')) : ?>is-invalid<?php endif ?>" name="login" placeholder="<?= lang('Auth.emailOrUsername') ?>">
  27. <div class="invalid-feedback">
  28. <?= session('errors.login') ?>
  29. </div>
  30. </div>
  31. <?php endif; ?>
  32. <div class="form-group">
  33. <label for="password"><?= lang('Auth.password') ?></label>
  34. <input type="password" name="password" class="form-control <?php if (session('errors.password')) : ?>is-invalid<?php endif ?>" placeholder="<?= lang('Auth.password') ?>">
  35. <div class="invalid-feedback">
  36. <?= session('errors.password') ?>
  37. </div>
  38. </div>
  39. <?php if ($config->allowRemembering) : ?>
  40. <div class="form-check">
  41. <label class="form-check-label">
  42. <input type="checkbox" name="remember" class="form-check-input" <?php if (old('remember')) : ?> checked <?php endif ?>>
  43. <?= lang('Auth.rememberMe') ?>
  44. </label>
  45. </div>
  46. <?php endif; ?>
  47. <br>
  48. <button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.loginAction') ?></button>
  49. </form>
  50. <hr>
  51. <?php if ($config->allowRegistration) : ?>
  52. <p><a href="<?= route_to('register') ?>"><?= lang('Auth.needAnAccount') ?></a></p>
  53. <?php endif; ?>
  54. <?php if ($config->activeResetter) : ?>
  55. <p><a href="<?= route_to('forgot') ?>"><?= lang('Auth.forgotYourPassword') ?></a></p>
  56. <?php endif; ?>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <?= $this->endSection() ?>