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.

97 lines
3.3 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {% extends "base.html" %}
  2. {% load compress hc_extras static %}
  3. {% block title %}Sign In - {% site_name %}{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-xs-10 col-xs-offset-1 col-sm-12 col-sm-offset-0 col-lg-8 col-lg-offset-2">
  7. <h1>Sign In to {% site_name %}</h1>
  8. {% if bad_link %}
  9. <div class="alert alert-warning">
  10. <p>The login link you just used is either incorrect or expired.</p>
  11. <p>Please use the form below to request a fresh login link.</p>
  12. </div>
  13. {% endif %}
  14. <div class="row">
  15. <div class="col-sm-6">
  16. <form id="magic-link-form" method="post">
  17. {% csrf_token %}
  18. {% if magic_form.errors %}
  19. <p class="text-danger">Incorrect email address.</p>
  20. {% else %}
  21. <p>Enter your <strong>email address</strong>.</p>
  22. {% endif %}
  23. <input
  24. type="email"
  25. class="form-control input-lg"
  26. name="identity"
  27. value="{{ magic_form.email.value|default:"" }}"
  28. placeholder="[email protected]"
  29. autocomplete="email">
  30. <p id="link-instruction">
  31. We will email you a magic sign in link.
  32. </p>
  33. <button type="submit" class="btn btn-lg btn-primary btn-block">
  34. Email Me a Link
  35. </button>
  36. </form>
  37. <div id="login-sep" class="hidden-xs"><div>or</div></div>
  38. </div>
  39. <div class="col-xs-12 visible-xs-block">
  40. <div id="xs-login-sep">
  41. <div>or</div>
  42. </div>
  43. </div>
  44. <div class="col-sm-6">
  45. <form id="login-form" method="post">
  46. {% csrf_token %}
  47. <input type="hidden" name="action" value="login" />
  48. {% if form.errors %}
  49. <p class="text-danger">Incorrect email or password.</p>
  50. {% else %}
  51. <p>
  52. Enter your <strong>email address</strong> and <strong>password</strong>.
  53. </p>
  54. {% endif %}
  55. <input
  56. type="email"
  57. class="form-control input-lg"
  58. name="email"
  59. value="{{ form.email.value|default:"" }}"
  60. placeholder="[email protected]"
  61. autocomplete="email">
  62. <input
  63. type="password"
  64. class="form-control input-lg"
  65. name="password"
  66. placeholder="your password">
  67. <button type="submit" class="btn btn-lg btn-primary btn-block">
  68. Sign In
  69. </button>
  70. </form>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. {% endblock %}
  76. {% block scripts %}
  77. {% compress js %}
  78. <script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
  79. <script src="{% static 'js/bootstrap.min.js' %}"></script>
  80. <script src="{% static 'js/login.js' %}"></script>
  81. {% endcompress %}
  82. {% endblock %}