{% extends "doi_site/organisation_wrapper.html" %}

{% block content %}

<h2>Log in to the {{organisation_name}} DOI Service</h2>

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

{% if next %}
    {% if user.is_authenticated %}
    <p>Your account doesn't have access to this page. To proceed,
    please login with an account that has access.</p>
    {% else %}
    <p>Please login to see this page.</p>
    {% endif %}
{% endif %}

<form method="post" action="{% url 'login' %}">
	{% csrf_token %}
	<fieldset style="padding: 1em;">
		<legend>Login details</legend>
		<br />
		<table>
			<tr>
				<td><span style="color: red">* </span><label>
					{{ form.username.label_tag }}</label></td>
				<td style="float: right">{{ form.username  }}</td>
			</tr>
			<tr>
				<td><span style="color: red">* </span> <label>
				{{ form.password.label_tag }}</label>
				</td>
				<td style="float: right">{{ form.password }}
				</td>
			</tr>		
			<tr>
				<td></td>
				<td style="float: right"><input type="submit" value="login" />
					<input type="hidden" name="next" value="{{ next }}" /></td>
			</tr>				
		</table>
		
	</fieldset>

</form>

{% endblock %}