{# vim: set ts=2 et sts=2 sw=2: #}
{% from "layout/errorlist.html" import errorlist %}
{% extends "users/base.html" %}
{% set title = _('Log In') %}
{% set classes = 'login' %}
{% set use_browserid = LANG|lower in config.BROWSERID_LOCALES.split(' ') %}

{% block content %}
<section id="content">
  <div class="wrap">
    <div id="content-main" class="full">
      {% if request.user.is_authenticated() %}
        <article class="main">
          <h3>{{ _('You are already logged in.') }}</h3>
        </article>
      {% else %}
        <article id="login" class="main" data-browserid-signin-html="{{ url('users.browserid_signin_html') }}?next={{ next_url }}">
          {% if use_browserid %}
            {% include "users/browserid_signin.html" %}
          {% else %}
              <h1>{{ _('Log In') }}</h1>
              {% include "users/login_form.html" %}
          {% endif %}
          </article>
        {% endif %}
    </div>
   </div>
</section>
{% endblock %}
