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

{% block title %}{% trans "Login" %} | {{ block.super }}{% endblock %}

{% block breadcrumbs %}
{{ block.super }}<li>{% trans "Login" %}</li>
{% endblock %}

{% block content %}
<div id="login" class="form" dir="{% locale_dir %}">
    <h2>{% trans 'Login to Pootle' %}</h2>
    <form method="post" action='{{ "/accounts/login/"|l }}' 
      name="loginform" id="loginform">
    {% csrf_token %}
    {% if form.errors %}
        <div class="error">
        {% trans "Your username and password didn't match. Please try again." %}
        </div>
    {% endif %}
    {{ form.as_p }}
    <p class="buttons">
        <input type="submit" class="login" name="login" value="{% trans 'Login' %}" />
        <input type="hidden" name="next" value="{{ next }}" />
    </p>
    </form>
</div>

<h2 class="formlink">
  <a href='{{ "/accounts/password/reset/"|l }}'>{% trans "Lost your Password?" %}</a>
</h2>
{% if settings.CAN_REGISTER %}
<h2 class="formlink">{% trans "Don't have an account yet?" %}
    <a href='{{ "/accounts/register"|l }}' title="{% trans 'Register.' %}">{% trans 'Register.' %}</a>
</h2>
{% endif %}
{% endblock content %}

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