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.

90 lines
3.4 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. {% if allow_signup %}
  48. <div class="field">
  49. <span class="checkbox" style="margin-top:10px">
  50. Not registered yet ? <a href="{% url 'signup' %}"> Sign up </a>
  51. </span>
  52. </div>
  53. {% endif %}
  54. <input type="hidden" name="next" value="{{ next }}" />
  55. </form>
  56. {% if social_login_enabled %}
  57. <div class="is-divider" data-content="OR"></div>
  58. {% endif %}
  59. {% if github_login %}
  60. <a href="{% url 'social:begin' 'github' %}" class="button is-fullwidth mb10">
  61. <span class="icon"><i class="fab fa-github"></i></span>
  62. <span>Login with Github</span>
  63. </a>
  64. {% endif %}
  65. {% if aad_login %}
  66. <a href="{% url 'social:begin' 'azuread-tenant-oauth2' %}" class="button is-fullwidth mb10">
  67. <span class="icon"><i class="fab fa-microsoft"></i></span>
  68. <span>Login with Active Directory</span>
  69. </a>
  70. {% endif %}
  71. {% if okta_oauth_login %}
  72. <a href="{% url 'social:begin' 'okta-oauth2' %}" class="button is-fullwidth mb10">
  73. <span class="icon"><i class="fab fa-openid"></i></span>
  74. <span>Login with Okta</span>
  75. </a>
  76. {% endif %}
  77. {% if okta_openidconnect_login %}
  78. <a href="{% url 'social:begin' 'okta-openidconnect' %}" class="button is-fullwidth mb10">
  79. <span class="icon"><i class="fab fa-openid"></i></span>
  80. <span>Login with Okta</span>
  81. </a>
  82. {% endif %}
  83. </div>
  84. </div>
  85. </div>
  86. </section>
  87. {% endblock %}