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.

70 lines
2.6 KiB

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