{% extends "registration/base.html" %}
{% load static %}
{% load i18n %}
{% load crispy_forms_tags %}
{% get_current_language as LANGUAGE_CODE %}

{% block title-page %}{% trans "Login" %}{% endblock %}

{% block extra_link %}
  {% include "open-graph.html" %}
{% endblock %}

{% block content_box %}
  <div class="row">
    {% if form.password.errors or form.username.errors %}
      <div class="login-form-errors">
        {% include "display-form-errors.html" %}
      </div>
    {% endif %}
    <div class="col-xs-{% if saml2 %}6{% else %}12{% endif %}">
      <div class="login-form">
        {% crispy form %}
      </div>
    </div>
    {% if saml2 %}
    <div class="col-xs-6">
      <h4 style="padding-top: 0; margin-top: 20px;">{% trans "Login with SSO" %}</h4>
      <a href="{% url "saml2_login" %}">{% trans "Click here!" %}</a>
    </div>
    {% endif %}
    <div class="row">
      <div class="col-sm-12">
        <a class="pull-right" href="{% url "accounts.password-reset" %}" style="margin-right: 15px;">
          {% trans "Forgot your password?" %}
        </a>
      </div>
    </div>
  </div>
{% endblock %}
