{% extends "base.html" %}
{% load i18n %}
{% load url from future %}

{% block title %}
{% trans "Log in" %}
{% endblock %}

{% block content %}
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
<script type="text/javascript">
$('.messages').delay(3000*(1+{{ messages|length }})).fadeOut('slow');
</script>
{% endif %}
<div id="login-box" class="unauth-box">
<h1>{% trans "site_title" %}</h1>
{% if form.errors %}
<p>{% trans "Your username and password didn't match. Please try again." %}</p>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
{% csrf_token %}
{{ form.as_p }}
<br class="clear"/>
<input id="connect" type="submit" value="{% trans "Login" %}" />
<input type="hidden" name="next" value="{{ next }}" />
</form>

<p id="contact"><a href="/contact">{% trans "Contact your administrator" %}</a></p>
<p id="forgotten-password"><a href="{% url "auth_password_reset" %}">{% trans "Forgotten password ? Change password !" %}</a></p>
</div>

{% endblock %}
