{% extends "base.html" %}
{% load static %}
{% load i18n %}

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

{% block css_import %}
{{block.super}}
        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/forms.css' %}" />
{% endblock %}

{% block login_actif %}actif{% endblock %}

{% block main_content %}
    <div class="register hdalab-form">
    	<h1>{% trans "Authentication" %}</h1>
        {% if form.errors %}
        <p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
        {% endif %}
        <form action="" method='post' id="login-form">
            {% csrf_token %}
            <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
            <p>
	            <label for="username">{% trans "Username" %}</label>
	            {{form.username}}
	        </p>
	        <p>
	            <label for="password">{% trans "Password" %}</label>
	            {{form.password}}
	        </p>
	        <div class="btn-submit">
	        	<p><input type="submit" value="{% trans 'Login' %}" /></p>
		  	</div>
        </form>
        <p class="champs"><a href="{% url 'auth_password_reset' %}">{% trans "Forgot password ?" %}</a></p>
        <p class="champs"><a href="{% url 'registration_register' %}">{% trans "Still not a user ? Create an account" %}</a></p>
	</div>
{% endblock %}
