login.html 1.27 KB
Newer Older
1
{% extends "registration/base.html" %}
2
{% load i18n %}
3
{% load crispy_forms_tags %}
4
{% get_current_language as LANGUAGE_CODE %}
5

6 7 8 9 10 11 12
{% block title-page %}{% trans "Login" %}{% endblock %}

{% block navbar-brand %}
  <a class="navbar-brand" href="{% url "dashboard.index" %}" style="padding: 10px 15px;">
    <img src="{{ STATIC_URL}}dashboard/img/logo.png" style="height: 25px;"/>
  </a>
{% endblock %}
13

14
{% block content_box %}
15 16 17 18 19 20
  <div class="row">
    {% if form.password.errors or form.username.errors %}
      <div class="login-form-errors">
        {% include "display-form-errors.html" %}
      </div>
    {% endif %}
21
    <div class="col-xs-{% if saml2 %}6{% else %}12{% endif %}">
22 23 24 25 26 27
      <div class="login-form">
        <form action="" method="POST">
          {% csrf_token %}
          {% crispy form %}
        </form>
      </div>
28
    </div>
29
    {% if saml2 %}
30 31
    <div class="col-xs-6">
      <h4 style="padding-top: 0; margin-top: 20px;">{% trans "Login with SSO" %}</h4>
32
      <a href="{% url "saml2_login" %}">{% trans "Click here!" %}</a>
33
    </div>
34 35 36 37 38 39
    {% endif %}
    </div>
    <div class="row">
      <div class="col-sm-12">
        <a class="pull-right" href="{% url "accounts.password-reset" %}">{% trans "Forgot your password?" %}</a>
      </div>
40 41
  </div>
</div>
42
{% endblock %}