{% extends "base.html" %}
{% load i18n baseurl %}

{% block title %}{{ block.super }}: {% trans "Register" %}{% endblock %}
 
{% block content %}
<div id="register" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
    <h2>{% trans "Register a New Pootle Account" %}</h2>
    <p>{% trans "Fill in the following form to get started translating." %}</p>
    <form method="post" action="" name="registerform" id="registerform">
    {% if form.non_field_errors %}
        {{ form.non_field_errors }}
    {% endif %}
    <p>
        <label for="username">{% trans "Username" %}</label>
        {{ form.username }}
        {{ form.username.errors }}
    </p>
    <p>
        <label for="email">{% trans "Email Address" %}</label>
        {{ form.email }}
        {{ form.email.errors }}
    </p>
    <p>
        <label for="password1">{% trans "Password" %}</label>
        {{ form.password1 }}
        {{ form.password1.errors }}
    </p>
    <p>
        <label for="password2">{% trans "Password (again)" %}</label>
        {{ form.password2 }}
        {{ form.password2.errors }}
    </p>
    <p class="common-buttons-block submit">
        <input type="submit" class="register" name="register" value="{% trans 'Register' %}" />
    </p>
</form>
</div>

<h2 class="loginlink">{% trans "Already have an account?" %}
    <a href='{{ "/accounts/login/"|l }}' title="{% trans "Log In." %}">{% trans "Log In." %}</a>
</h2>
{% endblock %}

{% block scripts_extra %}
  <script>
    $(document).ready(function () {
        $("#id_username").focus();
    });
  </script>
{% endblock scripts_extra %}
