{% extends "security/base.html" %}

{% block security_content %}

  <div class="alert alert-info alert-dismissable">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    <ul>
      <li>
        Already have an account? <a href="{{ url_for_security('login') }}">Login here</a>
      </li>
    </ul>
  </div>

  <div class="page-header">
    <h1>Register an account</h1>
  </div>

  <form class="form form-horizontal" action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
    {{ register_user_form.csrf_token }}

    {{ wtf.horizontal_field(register_user_form.email) }}
    {{ wtf.horizontal_field(register_user_form.password) }}
    {% if register_user_form.password_confirm %}
        {{ wtf.horizontal_field(register_user_form.password_confirm) }}
    {% endif %}

    {# <p>
      {% for error in register_user_form.recaptcha.errors %}
          {{ error }}
      {% endfor %}
      {{ register_user_form.recaptcha }}
    </p> #}

    <div class="col-lg-offset-2">
        <input type="submit" value="Register" class="btn btn-primary" />
    </div>
  </form>

{% endblock %}

{% block tail_js %}
  {{ super() }}
  <script type="text/javascript">
    $(function() { $($("#email").focus()); });
  </script>
{% endblock %}
