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

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

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

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

{% block main_content %}
<div class="register hdalab-form">
  <h1>{% trans "Nouvel Utilisateur" %}</h1>
  {% if form.errors %}
    <p class="error">{% trans "Oups ! Il y a un problème dans les données du nouvel utilisateur" %}</p>
  {% endif %}
  <form action="." method='post'>
    {% csrf_token %}
    <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
    {% for hidden in form.hidden_fields %}
      {{ hidden }}
    {% endfor %}
    {% for field in form.visible_fields %}
    <div class="registration-field-wrapper {{ field.css_classes }}">
        {{ field.label_tag }} {{ field }}
        {% if field.help_text %}
        <span class="helptext">{{ field.help_text|safe }}</span>
        {% endif %}
        {{ field.errors }}
    </div>
    {% endfor %}
		<div class="btn-submit">
  	    	<p><a class="btn-previous" href="{% url 'login' %}">{% trans "Precedent" %}</a><input type="submit" value="{% trans 'Submit' %}" /></p>
		</div>
	</form>
</div>
{% endblock %}
