{% extends "charme_base.html" %}

{% load i18n %}

{% block main %}

{% block registration_header %}
<h2>User Registration</h2>
{% endblock %}

{% if user_form.non_field_errors %}
<div class=error>
	<ul>
		<li>{{ user_form.non_field_errors }}</li>
	</ul>
</div>
{% endif %}

<div class=contactform>
	<div class=accounts>
		{% if openid %}
			<form method="post" action="{% url 'user_register' %}">
		{% else %}
			<form method="post" action="{% url 'registration' %}">
		{% endif %}
			{% csrf_token %}
			{% if request.REQUEST.next %}
				<input type="hidden" name="next" value="{{ request.REQUEST.next }}" />
			{% else %}
				<input type="hidden" name="next" value="{{ next }}" />
			{% endif %}
			<table>
				<tr>
					<td><label>{% trans "Username:" noop %}</label></td>
					<td>{{ user_form.username }}</td>
					<td class=error>{{ user_form.username.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "First name:" noop %}</label></td>
					<td>{{ user_form.first_name }}</td>
					<td class=error>{{ user_form.first_name.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Last name:" noop %}</label></td>
					<td>{{ user_form.last_name }}</td>
					<td class=error>{{ user_form.last_name.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Email:" noop %}</label></td>
					<td>{{ user_form.email }}</td>
					<td class=error>{{ user_form.email.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Show my email in annotations:" noop %}</label></td>
					<td>{{ user_form.show_email }}</td>
					<td class=error>{{ user_form.show_email.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Password:" noop %}</label></td>
					<td>{{ user_form.password }}</td>
					<td class=error>{{ user_form.password.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Confirm password:" noop %}</label></td>
					<td>{{ user_form.confirm_password }}</td>
					<td class=error>{{ user_form.confirm_password.errors }}</td>
				</tr>
				<tr>
					<td><label>{% trans "Accept conditions of use:" noop %}</label></td>
					<td>{{ user_form.conditions_of_use }}</td>
					<td class=error>{{ user_form.conditions_of_use.errors }}</td>
				</tr>
				<tr>
					<td><a href="/conditionsofuse/">Conditions Of Use</a></td>
					<td></td>
					<td></td>
				</tr>
				<tr>
					<td></td>
					<td style="text-align: right;"><input type="submit"
						value="Create account"></td>
					<td></td>
				</tr>
			</table>
		</form>
	</div>
</div>

{% block registration_footer %}
{% endblock %}

{% endblock %}
