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

{% block css %}
    {% load staticfiles %}
{% endblock %}

{% block scripts %}
{% endblock %}

{% block body %}
<div class="container">
    <div class="row">
        <div class="col">
            <h1>Register</h1>
            <p class="text-muted">
                With a account, you are able to comment, upload images and mark favorites. These actions are public and are subject to web-crawlers. <br/>
                Choose a username you are comfortable being associated with.
            </p>

            <form method="post" enctype="multipart/form-data">
                {% csrf_token %}

                <div class="form-group row">
                    <label for="{{ form.username.auto_id }}" class="col-1 col-form-label">{{ form.username.label }}</label>
                    
                    <div class="col-4">
                        {{form.username}}
                        <span class="custom-file-control"></span>
                    </div>

                    {% if form.username.errors %}
                    <div class="col-md-offset-2 col-8 has-errors text-danger small">
                        {{form.username.errors}}
                    </div>
                    {% endif %}
                </div>

                <div class="form-group row">
                    <label for="{{ form.email.auto_id }}" class="col-1 col-form-label">{{ form.email.label }}</label>
                    
                    <div class="col-4">
                        {{form.email}}
                        <span class="custom-file-control"></span>
                    </div>

                    {% if form.email.errors %}
                    <div class="col-md-offset-2 col-8 has-errors text-danger small">
                        {{form.email.errors}}
                    </div>
                    {% endif %}
                </div>

                <div class="form-group row">
                    <label for="{{ form.password1.auto_id }}" class="col-1 col-form-label">{{ form.password1.label }}</label>
                    
                    <div class="col-4">
                        {{form.password1}}
                        <span class="custom-file-control"></span>
                    </div>

                    {% if form.password1.errors %}
                    <div class="col-md-offset-2 col-8 has-errors text-danger small">
                        {{form.password1.errors}}
                    </div>
                    {% endif %}
                </div>

                <div class="form-group row">
                    <label for="{{ form.password2.auto_id }}" class="col-1 col-form-label">{{ form.password2.label }}</label>
                    
                    <div class="col-4">
                        {{form.password2}}
                        <span class="custom-file-control"></span>
                    </div>

                    {% if form.password2.errors %}
                    <div class="col-md-offset-2 col-8 has-errors text-danger small">
                        {{form.password2.errors}}
                    </div>
                    {% endif %}
                </div>

                <button type="submit" class="btn btn-primary">Register</button>
            </form>
        </div>
    </div>
</div>
{% endblock %}