{% extends "base_site.html" %}
{% load i18n staticfiles %}
{% load forms %}

{% block bodyclass %}login{% endblock %}

{% block nav-global %}{% endblock %}

{% block content_title %}{% endblock %}

{% block breadcrumbs %}{% endblock %}

{% block userlinks %}{% endblock %}

{% block content %}
    {% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
    <p class="errornote">
    {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
    </p>
    {% endif %}

    {% if form.non_field_errors or form.this_is_the_login_form.errors %}
    {% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %}
    <p class="errornote">
        {{ error }}
    </p>
    {% endfor %}
    {% endif %}

    <p>You can also login using <a href="{% url 'kg_profile_login' %}?{{ querystring }}">Karaage
    authentication</a>.</p>

    <form method="post" action="">{% csrf_token %}
        {% form_as_div form %}
        <input type="submit" name="login" value="Login" />
    </form>

    <script type="text/javascript">
        document.getElementById('id_institute').focus()
    </script>
{% endblock %}
