{% extends 'preauth/base.html' %}

{% block preauth_content %}
    <div class="xsd-preauth-content">

        <p>You can create an account via Facebook or your email address.</p>

        <div class="xsd-preauth-register-facebook">
            {% include 'preauth/facebook_button.html' %}
            <hr/>
        </div>

        <div class="xsd-preauth-form">
            <form action='.' method="POST">
                {% csrf_token %}
                {% if redirect_field_value %}
                    <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
                {% endif %}

                {% with WIDGET_ERROR_CLASS='form-control-danger' WIDGET_REQUIRED_CLASS='my_required' %}
                    {% include 'base/field.html' with field=form.first_name %}
                    {% include 'base/field.html' with field=form.last_name %}
                    {% include 'base/field.html' with field=form.email %}
                    {% include 'base/field.html' with field=form.password1 %}
                {% endwith %}


                <button type="submit"
                        class="btn btn-primary">
                    Create account
                </button>

            </form>
        </div>
    </div>
{% endblock %}
