{% extends "sp_base.html" %}
{% load i18n %}

{% block content %}
<div id="padding-left">&nbsp;</div>
    <div id="centered-column">
{% if form.errors %}
    <div class="centered" id="error-msg">{% trans "Missing fields" %}</div>
{% endif %}

{{ form.user_nickname }}<br><br>
{{ form.user_help_msg|linebreaksbr }}<br><br>

<form action="{% url "register" %}" method="post">
    {% csrf_token %}
    <h2>{% trans "Guest:" %}</h2>
    {% include "registration_field.html" with field=form.nom %}
    {% include "registration_field.html" with field=form.prenom %}
    {% include "registration_field.html" with field=form.email %}
    {% include "registration_field.html" with field=form.s_etablissement %}
    {% include "registration_field.html" with field=form.ep_primary_affiliation %}
    {% include "registration_field.html" with field=form.s_emp_corps %}
    {% include "registration_field.html" with field=form.s_liste_rouge %}
    </p>
    <h2>{% trans "Who's inviting you?" %}</h2>
    {% include "registration_field.html" with field=form.hote_etablissement %}
    {% include "registration_field.html" with field=form.hote_unite %}
    {% include "registration_field.html" with field=form.hote_commentaire %}
    {{ form.ep_principal_name.as_hidden }}
    <p class="centered"><input type="submit" value="{% trans "Submit" %}"/></p>
</form>
    {% comment %}
    {% if form.email.value %}
    <p class="centered">
    {% trans "Not your account?" %}<br>
    <a href="{% url "register"%}">{% trans "Fill in an empty form" %}</a>
    </p>
    <p class="centered">
    {% trans "Registered to the RENATER identity federation?" %}<br>
    <a href="{% url "register" %}">{% trans "Use your RENATER account" %}</a>
    </p>
    {% endif %}
    {% endcomment %}
{% if form.errors %}
    <div class="centered" id="error-msg">{% trans "Missing fields" %}</div>
{% endif %}
   </div>
        <div id="padding-right">&nbsp;</div>
{% endblock %}
