{% extends "two_column_body.html" %}
{% import "authopenid/authopenid_macros.html" as login_macros %}
{% import "macros.html" as main_macros %}
<!--signup.html-->
{% block title %}{% spaceless %}{% trans %}Signup{% endtrans %}{% endspaceless %}{% endblock %}
{% block forestyle %}
    <link rel="stylesheet" type="text/css" media="screen" href="{{"/jquery-openid/openid.css"|media}}"/>
{% endblock %}
{% block content %}
{% if settings.PASSWORD_REGISTER_SHOW_PROVIDER_BUTTONS == True %}
    <h1 class="section-title">{% trans %}Please register by clicking on any of the icons below{% endtrans %}</h1>
    <form id="signin-form" method="post" action="{{ settings.LOGIN_URL }}">{% csrf_token %}
        {# hide_local_login == True because it is password reg form #}
        {{ 
            login_macros.provider_buttons(
                login_form = login_form,
                major_login_providers = major_login_providers,
                minor_login_providers = minor_login_providers,
                hide_local_login = True,
                settings = settings
            )
        }}
    </form>
    <h2>{% trans %}or create a new user name and password here{% endtrans %}</h2>
{% else %}
    <h1 class="section-title">{% trans %}Create login name and password{% endtrans %}</h1>
    <!--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-->
{%endif%}
<form id="signup-form" action="{% url user_signup_with_password %}" method="post" accept-charset="utf-8">{% csrf_token %}
    {{form.login_provider}}
    <ul class="form-horizontal-rows">
    <li><label for="usename_id">{{form.username.label}}</label>{{form.username}}{{form.username.errors}}</li>
    <li><label for="email_id">{{form.email.label}}</label>{{form.email}}{{form.email.errors}}</li>
    <li><label for="password1_id">{{form.password1.label}}</label>{{form.password1}}{{form.password1.errors}}</li>
    <li><label for="password2_id">{{form.password2.label}}</label>{{form.password2}}{{form.password2.errors}}</li>
    </ul>
    {% if settings.USE_RECAPTCHA %}
        <p class="signup_p">{% trans %}Please read and type in the two words below to help us prevent automated account creation.{% endtrans %}</p>
        {{form.recaptcha}}
    {% endif %}
    <div class="submit-row"><input id="signup-button" type="submit" class="button" value="{% trans %}Signup{% endtrans %}" /> 
    {% if settings.PASSWORD_REGISTER_SHOW_PROVIDER_BUTTONS == False %}
        <strong>{% trans %}or{% endtrans %}
        <a href="{{ settings.LOGIN_URL }}">{% trans %}return to login page{% endtrans %}</a></strong>
    {% endif %}
    </div>
</form>
{% endblock %}
{% block endjs %}
    {% include "authopenid/providers_javascript.html" %}
    {{ main_macros.one_shot_form_js(form="#signup-form", submit_button="#signup_button") }}
{% endblock %}
<!--end signup.html-->
