{% extends "sitegate/signup/_form_base.html" %}
{% load i18n %}
{% block fields %}
    {% if signup_form.non_field_errors %}
    <div class="alert alert-danger">
        <ul class="unstyled">
            {% for error in signup_form.non_field_errors %}
            <li>{{ error }}</li>
            {% endfor %}
        </ul>
    </div>
    {% endif %}
    {% for field in signup_form %}
        <div class="form-group {% if field.errors %}is-invalid{% endif %}">
            {{ field }}
            {% if field.errors %}
                <div class="invalid-feedback">{{ field.errors.0 }}</div>
            {% elif field.help_text %}
                <small class="form-text text-muted">{{ field.help_text }}</small>
            {% endif %}
        </div>
    {% endfor %}
    <input type="submit" class="btn btn-block btn-primary" value="{% trans "Sign up" %}" />
{% endblock %}
