euscanwww: Improved forms UI, added preferences page and change password

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino
2012-08-08 10:46:36 +02:00
parent c4e3c4c04a
commit 77f1cb52ea
15 changed files with 140 additions and 56 deletions

View File

@ -5,12 +5,18 @@
{% block content %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
<div class="alert alert-error">
<strong>Error:</strong> Your username and password didn't match. Please try again.
</div>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
<h2>
Login
</h2>
<form method="post" action="{% url "auth_login" %}">
{% csrf_token %}
<table>
<table class="table">
<tr>
<th>{{ form.username.label_tag }}</th>
<td>{{ form.username }}</td>
@ -27,10 +33,10 @@
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
</td>
<td></td>
<td>
<a class="pull-right" href="{% url "django.contrib.auth.views.password_reset" %}">Forgot password</a>
</td>

View File

@ -1,13 +0,0 @@
{% extends "registration/_registration_base.html" %}
{% load i18n %}
{% block content %}
<p>You're logged out."</p>
<p>Redirect...</p>
<script type="text/javascript">
window.location.href = "/";
</script>
{% endblock %}

View File

@ -1,6 +0,0 @@
{% extends "registration/_registration_base.html" %}
{% block title %}Password changed{% endblock %}
{% block content %}
Password successfully changed!
{% endblock %}

View File

@ -1,14 +1,22 @@
{% extends "registration/_registration_base.html" %}
{% load url from future %}
{% block title %}Change password{% endblock %}
{% block content %}
<form method='post' action=''>{% csrf_token %}
<table>
<h2>
Change password
</h2>
<form method='post' action='.'>
{% csrf_token %}
<table class="table">
{{ form }}
<tr>
<td></td>
<td>
<input type='submit' value="Change password" />
<input class="btn" type='submit' value="Change password" />
</td>
</tr>
</table>

View File

@ -2,9 +2,15 @@
{% block title %}Confirm password reset{% endblock %}
{% block content %}
Enter your new password below to reset your password:
<h2>
Reset password
</h2>
<p class="padded">
Enter your new password below to reset your password:
</p>
<form method="post" action="">{% csrf_token %}
<table>
<table class="table">
{{ form.as_table }}
<tr>
<td></td>

View File

@ -3,15 +3,21 @@
{% block title %}Reset password{% endblock %}
{% block content %}
<h2>
Reset password
</h2>
<p class="padded">
Forgot your password? Enter your email in the form below and we'll send you
instructions for creating a new one.
</p>
<form method='post' action=''>{% csrf_token %}
<table>
<table class="table">
{{ form }}
<tr>
<td></td>
<td><input type='submit' value="Reset password" /></td>
<td><input class="btn" type='submit' value="Reset password" /></td>
</tr>
</table>
</form>

View File

@ -5,8 +5,12 @@
{% endblock %}
{% block content %}
<h2>
Register
</h2>
<form method='post' action=''>{% csrf_token %}
<table>
<table class="table">
{{ form }}
<tr>
<td></td>