{% extends "geonode_base.html" %}

{% load url from future %}
{% load i18n %}
{% load bootstrap_tags %}

{% block head_title %}{% trans "Sign up" %}{% endblock %}

{% block body %}
<div class="page-header">
  <h2>{% trans "Sign up" %}</h2>
</div>
<div class="row">
  <div class="col-md-8">
  {% if ACCOUNT_OPEN_SIGNUP %}
    <form id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" class="form-horizontal"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
      <fieldset>
      {% csrf_token %}
      {{ form|as_bootstrap }}
      {% if redirect_field_value %}
        <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
      {% endif %}
        <div class="form-actions">
          <button type="submit" class="btn btn-primary">{% trans "Sign up" %}</button>
        </div>
      </fieldset>
    </form>
    {% else %}
    <p>{% trans "Sorry, registrations are not open at this time." %}</p>
    {% endif %}
  </div>
  <div class="col-md-4">
    {% include "account/_signup_sidebar.html" %}
  </div>
</div>
{% endblock %}

{% block extra_script %}
{{ block.super }}
    <script type="text/javascript">
        $(document).ready(function() {
            $('#id_username').focus();
        });
    </script>
{% endblock %}
