euscanwww: Improved forms UI, added preferences page and change password
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
@ -8,8 +8,19 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>Welcome {{ user }}</h2>
|
||||
<h2>
|
||||
Welcome {{ user }}
|
||||
|
||||
<span class="pull-right">
|
||||
<a href="{% url "auth_password_change" %}" class="btn">
|
||||
Change password
|
||||
</a>
|
||||
|
||||
<a href="{% url "accounts_preferences" %}" class="btn">
|
||||
Preferences
|
||||
</a>
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
<h3 class="padded">Summary</h3>
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
{% extends "_base.html" %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - Edit user preferences for {{ user }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
{% if updated %}
|
||||
<div class="alert alert-success">
|
||||
<strong>Saved!</strong> Your preferences has been saved
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>
|
||||
Edit user preferences
|
||||
</h2>
|
||||
|
||||
<form method='post' action='.'>
|
||||
{% csrf_token %}
|
||||
<table class="table">
|
||||
{{ form }}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<input class="btn" type='submit' value="Save" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{% endblock %}
|
@ -15,7 +15,7 @@
|
||||
|
||||
<form action="{% url "world_scan" %}" method="post" enctype="multipart/form-data">{% csrf_token %}
|
||||
{{ world_form.as_p }}
|
||||
<input type="submit" value="Submit" />
|
||||
<input class="btn" type="submit" value="Submit" />
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
<form action="{% url "world_scan" %}" method="post">{% csrf_token %}
|
||||
{{ packages_form.as_p }}
|
||||
<input type="submit" value="Submit" />
|
||||
<input class="btn" type="submit" value="Submit" />
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -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> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a class="pull-right" href="{% url "django.contrib.auth.views.password_reset" %}">Forgot password</a>
|
||||
</td>
|
||||
|
@ -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 %}
|
@ -1,6 +0,0 @@
|
||||
{% extends "registration/_registration_base.html" %}
|
||||
{% block title %}Password changed{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Password successfully changed!
|
||||
{% endblock %}
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -5,8 +5,12 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>
|
||||
Register
|
||||
</h2>
|
||||
|
||||
<form method='post' action=''>{% csrf_token %}
|
||||
<table>
|
||||
<table class="table">
|
||||
{{ form }}
|
||||
<tr>
|
||||
<td></td>
|
||||
|
Reference in New Issue
Block a user