{% extends "base.html" %}
{% load i18n %}
{% block extra_head %} 

  <style type="text/css">
	div#body{
		background-color:transparent;
		border:0px;
	}
  </style>

{% endblock %}

{% block title %}{% trans "Login" %}{% endblock %}

{% block extrajs %}
<script type='text/javascript'>
$(document).ready(function(){
    $('a.loginform').attr('href', '{% url "auth_login" %}')
}
);
</script>
{% endblock %}

{% block content %}

<div id="login_form">
<div id="box"><h3>{% trans 'Login' %}</h3></div>

{% if form.errors %}
<div id="alert">
    <p style="color: #FF3333">{% trans "Your username and password didn't match. Please try again." %}</p>
</div>  
{% endif %}

{% if user.is_authenticated %}
<div id="alert">
    <p style="color: #FF3333">{% blocktrans %}You are already logged in as "{{ user }}".{% endblocktrans %}</p>
</div>  
{% endif %}

<form method="post" action="{% url "auth_login" %}">
{% csrf_token %} 
<table style="margin:auto">
<tr><td><label for="id_username">{% trans 'Username:' %}</label></td><td>{{ form.username }}</td></tr>
<tr><td><label for="id_password">{% trans 'Password:'%}</label></td><td>{{ form.password }}</td></tr>
</table>


<p>

<input type="submit" value="Login">
<input type="hidden" name="next" value="{{ next }}">
</p>
<a href="{% url "password_reset" %}" style="font-size:0.9em">Forgot my Password</a>
</form>

</div>
{% endblock %}
