login.html 1.46 KB
Newer Older
1 2 3 4
{% extends "base.html" %}
{% load i18n %}

{% block title %} {% trans "Damned Lies about GNOME" %} {% endblock %}
Claude Paroz's avatar
Claude Paroz committed
5
{% block extrahead %} <link rel="stylesheet" href="{{ STATIC_URL }}css/login.css"/> {% endblock %}
6 7 8
{% block content %}
<div class="mainpage">

Tom Tryfonidis's avatar
Tom Tryfonidis committed
9
<h2>{% trans "User Login" %}</h2>
10 11 12
{% if user.is_authenticated %}
  <p>{% blocktrans with user.username as username %}You are already logged in as {{ username }}.{% endblocktrans %}</p>
{% else %}
13
{% url 'register' as link %}
Tom Tryfonidis's avatar
Tom Tryfonidis committed
14
<p class="main_register">{% blocktrans %}If you do not own an account on this site, you can <a href='{{ link }}'>register</a> for a new account.{% endblocktrans %}</p>
15

16
<p>{% trans 'Log in with your username (or email) and password:' %}</p>
17
<form action="{% url 'login' %}" method="post" id="login-form" class="login">
18
  {% csrf_token %}
19
  <div class="form-row">
20 21
    {{ form.username.errors }}
    {{ form.username.label_tag }} {{ form.username }}
22 23
  </div>
  <div class="form-row">
24 25 26
    {{ form.password.errors }}
    {{ form.password.label_tag }} {{ form.password }}
    <span class="help"><a href="{% url 'password_reset' %}">{% trans 'Have you forgotten your password?' %}</a></span>
27 28 29 30 31 32 33 34 35 36 37 38 39
    <input type="hidden" name="referer" value="{{ referer|default:"" }}" />
  </div>
  <div class="submit-row">
    <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
  </div>
</form>

<script type="text/javascript">
document.getElementById('id_username').focus()
</script>
{% endif %}
</div>
{% endblock %}