{% extends "karvi/base/__2col.html" %}
{% load i18n %}
{% load karvi_style %}

{% block section %}
  <h1 class="title">{% trans "Create Account" %}</h1>
  <form method="post" action="{% url "signup" %}">
    {% csrf_token %}
    <input type="hidden" name="next" value="{{ next }}"/>
    {% for field in form %}
      <div class="field">
        <div class="label">
          {{ field.label_tag }}
        </div>
        <div class="control">
          {{ field|form_styling }}
        </div>
        {% if field.errors %}
          <ul class="help is-danger">
            {% for error in field.errors %}
              <li>{{ error }}</li>
            {% endfor %}
          </ul>
        {% endif %}
      </div>
    {% endfor %}
    <div class="field is-grouped is-grouped-right">
      <div class="control">
        <input class="button is-primary" type="submit" value="{% trans "Sign Up" %}"/>
      </div>
    </div>
  </form>
{% endblock section %}

{% block aside %}
  <div class="menu">
    <p class="menu-label">Usuarios</p>
    <ul class="menu-list">
      <li><a href="{% url "login" %}">{% trans "Log In" %}</a></li>
      <li><a class="is-active" href="{% url "signup" %}">{% trans "Sign Up" %}</a></li>
      <li><a href="{% url "password_reset" %}">{% trans "Recover Password" %}</a></li>
    </ul>
  </div>
{% endblock aside %}
