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.

53 lines
2.5 KiB

  1. {% extends "base.html" %} {% load widget_tweaks %} {% block content %}
  2. <section class="hero container has-text-centered">
  3. <div class="columns hero-body">
  4. <div class="column is-4 is-offset-4">
  5. <div class="box has-text-left">
  6. {% if form.errors %}
  7. <p>Your username and password didn't match. Please try again.</p>
  8. {% endif %} {% if next %} {% if user.is_authenticated %}
  9. <p>Your account doesn't have access to this page. To proceed, please login with an account that has access.</p>
  10. {% else %}
  11. <p>Please login to see this page.</p>
  12. {% endif %} {% endif %}
  13. <form method="post" action="{% url 'login' %}">
  14. {% csrf_token %}
  15. <div class="field ">
  16. <label class="label">Username</label>
  17. <div class="control has-icons-left has-icons-right">
  18. {{ form.username|add_class:"input" }}
  19. <span class="icon is-small is-left">
  20. <i class="fas fa-user"></i>
  21. </span>
  22. <span class="icon is-small is-right">
  23. <i class="fas fa-check"></i>
  24. </span>
  25. </div>
  26. </div>
  27. <div class="field">
  28. <label class="label">Password</label>
  29. <div class="control has-icons-left has-icons-right">
  30. {{ form.password|add_class:"input"}}
  31. <span class="icon is-small is-left">
  32. <i class="fas fa-lock"></i>
  33. </span>
  34. <span class="icon is-small is-right">
  35. <i class="fas fa-check"></i>
  36. </span>
  37. </div>
  38. </div>
  39. <div class="field">
  40. <label class="checkbox">
  41. <input type="checkbox"> Remember me
  42. </label>
  43. </div>
  44. <input class="button is-block is-primary is-middle is-fullwidth" type="submit" value="Login" />
  45. <input type="hidden" name="next" value="{{ next }}" />
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. </section>
  51. {% endblock %}