{% extends "registration/base.html" %}
{% load i18n %}

{% 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">
        <form method="POST">
         {% csrf_token %}
          <div class="input-group">
            <span class="input-group-addon">
              <i class="fa fa-user"></i>
            </span>
            <input type="text" name="username" class="form-control">
          </div>
          <div class="input-group">
            <span class="input-group-addon">
              <i class="fa fa-lock"></i>
            </span>
            <input type="password" name="password" class="form-control">
          </div>
          <button type="submit" class="btn btn-success">Sign in</button>
        </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>
{% endblock %}
