{% extends "one_column_body.html" %}
{% import "authopenid/authopenid_macros.html" as login_macros %}
{% import "macros.html" as main_macros %}
<!--signup.html-->
{% block title %}{% filter trim %}{% trans %}Signup{% endtrans %}{% endfilter %}{% endblock %}
{% block forestyle %}
    <link rel="stylesheet" type="text/css" media="screen" href="{{ "/style/openid.css"|media }}"/>
{% endblock %}
{% block content %}
{% if settings.AUTHENTICATION_PAGE_MESSAGE %}
    <div class="instructions-message">
        {{ settings.AUTHENTICATION_PAGE_MESSAGE|convert_markdown }}
    </div>
{% endif %}
<!--p class="message">{% trans %}<span class='strong big'>If you prefer, create your forum login name and
password here. However</span>, please keep in mind that we also support
<strong>OpenID</strong> login method. With <strong>OpenID</strong> you can
simply reuse your external login (e.g. Gmail or AOL) without ever sharing
your login details with anyone and having to remember yet another password.{% endtrans %}</p-->
{% if settings.NEW_REGISTRATIONS_DISABLED %}
    <h1 class="section-title">{% trans %}New user registrations are disabled{% endtrans %}</h1>
    <div>
        {{ settings.NEW_REGISTRATIONS_DISABLED_MESSAGE }}
    </div>
{% else %}
<h1 class="section-title">{% trans %}Create login name and password{% endtrans %}</h1>
<form id="signup-form" action="{{ url('user_signup_with_password') }}" method="post" accept-charset="utf-8">{{ csrf_input }}
    <div class="form-group">
        {{ form.username.errors }}
        <input class="required login" id="id_username"
            maxlength="255" name="username" tabindex="0" type="text"
            {% if form.username.value() %}
                value="{{ form.username.value()|escape }}"
            {% endif %}
            placeholder="{% trans %}Choose a screen name{% endtrans %}"
        >
    </div>
    <div class="form-group">
        {{ form.email.errors }}
        <input class="required login" id="id_email"
            maxlength="200" name="email" type="text"
            {% if form.email.value() %}
                value="{{ form.email.value()|escape }}"
            {% endif %}
            placeholder="{% trans %}Email address{% endtrans %}"
        >
    </div>
    <div class="form-group">
        {{ form.password1.errors }}
        <input class="required login" id="id_password1"
            name="password1" type="password"
            {% if form.password1.value() %}
                value="{{ form.password1.value()|escape }}"
            {% endif %}
            placeholder="{% trans %}Password{% endtrans %}"
        >
    </div>
    <div class="form-group">
        {{ form.password2.errors }}
        <input class="required login" id="id_password2"
            name="password2" type="password"
            {% if form.password2.value() %}
                value="{{ form.password2.value()|escape }}"
            {% endif %}
            placeholder="{% trans %}Password retyped{% endtrans %}"
        >
    </div>
    {% set tos_field=form.terms_accepted %}
    {% include "authopenid/tos_field.html" %}
    {% if form.recaptcha %}
        {{ main_macros.form_field_with_errors(form.recaptcha) }}
    {% endif %}
    <input id="signup-button" type="submit" class="button" value="{% trans %}Signup{% endtrans %}" />
</form>
{% endif %}
{% endblock %}
<!--end signup.html-->
