 {% extends 'base.html' %}

{% block title %}
    Register New User
{% endblock %}

{% block content %}
 <div class="col-md-offset-3 col-md-6">
     <h1>Register</h1>
     <form action="" method="post">

         {{ form.csrf_token() }}
         <p>
            {{ form.username.label(class="control-label") }}<br>
            {{ form.username(size=32, class="form-control", placeholder="Input your name") }}<br>
            {% for error in form.username.errors %}
            <span style="color: red;">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.email.label(class="control-label") }}<br>
            {{ form.email(size=64, class="form-control", placeholder="Input your email") }}<br>
            {% for error in form.email.errors %}
            <span style="color: red;">[{{ error }}]</span>
            {% endfor %}
        </p>
          <p>
            {{ form.api_token.label(class="control-label") }}<br>
            {{ form.api_token(size=255, class="form-control", placeholder="Input your API token") }}<br>
            {% for error in form.api_token.errors %}
            <span style="color: red;">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.password.label(class="control-label") }}<br>
            {{ form.password(size=32, class="form-control", placeholder="Input your password") }}<br>
            {% for error in form.password.errors %}
            <span style="color: red;">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>
            {{ form.password_repeat.label(class="control-label") }}<br>
            {{ form.password_repeat(size=32, class="form-control", placeholder="Repeat your password") }}<br>
            {% for error in form.password_repeat.errors %}
            <span style="color: red;">[{{ error }}]</span>
            {% endfor %}
        </p>
        <p>{{ form.submit(class="btn btn-success") }}</p>
     </form>
 </div>
{% endblock %}
