diff options
author | Johan Lundberg <lundberg@nordu.net> | 2011-05-27 15:09:44 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2011-05-27 15:09:44 +0200 |
commit | a389359b74e842702fbb76ba31f2608c4a141c63 (patch) | |
tree | a5f6b84fe54b9d9f345a9b856c99718156756ca9 | |
parent | 1fcfc08280991ac25afcf78723340279ac79594f (diff) |
Added templates for mobile devices.
-rw-r--r-- | templates/changepw/base_m.html | 28 | ||||
-rw-r--r-- | templates/changepw/change_other_m.html | 41 | ||||
-rw-r--r-- | templates/changepw/change_password.html | 5 | ||||
-rw-r--r-- | templates/changepw/change_password_m.html | 55 | ||||
-rw-r--r-- | templates/changepw/index_m.html | 32 | ||||
-rw-r--r-- | templates/changepw/reset_password_m.html | 31 |
6 files changed, 189 insertions, 3 deletions
diff --git a/templates/changepw/base_m.html b/templates/changepw/base_m.html new file mode 100644 index 0000000..130719e --- /dev/null +++ b/templates/changepw/base_m.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<head> + <meta name="apple-mobile-web-app-capable" content="yes" /> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> + <title>{% block title %}{% endblock %}</title> + <!-- <link rel="apple-touch-icon" href="{{ MEDIA_URL }}img/ios-icon.png" /> --> + <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" /> + <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> + <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script> + {% block js %}{% endblock %} +</head> + +<body> +<div data-role="page" data-theme="b"> + <header data-role="header" data-theme="b"> + {% block header %}{% endblock %} + </header> + <div data-role="content" data-theme="b"> + {% block content %}{% endblock %} + </div> + <footer data-role="footer" class="ui-bar" data-theme="b"> + {% block footer %}{% endblock %} + </footer> +</div> +</body> +</html> diff --git a/templates/changepw/change_other_m.html b/templates/changepw/change_other_m.html new file mode 100644 index 0000000..df30d9d --- /dev/null +++ b/templates/changepw/change_other_m.html @@ -0,0 +1,41 @@ +{% extends "base_m.html" %} +{% block js %} +{% endblock %} +{% block title %}Change other{% endblock %} + +{% block header %}<h1>Change other</h1>{% endblock %} + +{% block content %} +<h2>Change other</h2> +{% if return_value == None %} + <form action="{% url changeother %}" method="post" autocomplete="off">{% csrf_token %} + <table> + <tr> + <td class="formlabel">Some input:</td> + </tr> + <tr> + <td class="formfield"> + <textarea name="change_input" cols="50" rows="10"></textarea> + </td> + </tr> + <tr> + <td class="formbutton"><input type="submit" value="Submit" /></td> + </tr> + </table> + </form> +{% else %} + {% if return_value == 0 %} + <p>Updated successfully.</p> + {% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> + {% endif %} +{% endif %} +{% endblock %} + +{% block footer %} +<a href="{% url index %}" data-role="button" data-icon="back">Back</a> +<a href="{% url logout %}" rel="external" data-role="button" data-icon="delete">Log out</a> +{% endblock %} + + diff --git a/templates/changepw/change_password.html b/templates/changepw/change_password.html index 8aff817..bfed25a 100644 --- a/templates/changepw/change_password.html +++ b/templates/changepw/change_password.html @@ -9,10 +9,9 @@ {% if form %} <p>When thinking of a new password you need to remember to use:</p> <ul> - <li>no fewer than eight characters</li> - <li>at least one number</li> + <li>no fewer than ten characters</li> <li>at least one upper case and one lower case letter</li> - <li>one or more special characters</li> + <li>three or more numbers or special characters</li> </ul> <p class="error"> diff --git a/templates/changepw/change_password_m.html b/templates/changepw/change_password_m.html new file mode 100644 index 0000000..2062df0 --- /dev/null +++ b/templates/changepw/change_password_m.html @@ -0,0 +1,55 @@ +{% extends "base_m.html" %} +{% block js %} {% endblock %} + +{% block title %}Change password{% endblock %} + +{% block header %}<h1>Change password</h1>{% endblock %} + +{% block content %} +{% if form %} +<p>When thinking of a new password you need to remember to use:</p> +<ul> + <li>no fewer than ten characters</li> + <li>at least one upper case and one lower case letter</li> + <li>three or more numbers or special characters</li> +</ul> + + <p class="error"> + {{ form.non_field_errors }} + </p> + <form action="{% url changepw %}" method="post" autocomplete="off">{% csrf_token %} + <table> + <tr> + <th class="formlabel">Username:</th><td>{{ username }}</td> + </tr> + {% for field in form %} + <tr> + <td class="fielderrors">{{ field.errors }}</td> + </tr> + <tr> + <th class="formlabel">{{ field.label_tag }}</th><td class="formfield">{{ field }}</td><td><span class="password_strength"></span></td> + </tr> + {% endfor %} + </table> + <input type="submit" value="Submit" /> + </form> + <script type="text/javascript"> + $('form').attr('autocomplete', 'off'); + $('#id_new_password').password_strength(); + $('#id_new_password_again').password_strength(); + </script> +{% else %} + {% if return_value == 0 %} + <p>Your password was changed successfully.</p> + {% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> + {% endif %} +{% endif %} +{% endblock %} + +{% block footer %} +<a href="{% url index %}" data-role="button" data-icon="back">Back</a> +<a href="{% url logout %}" rel="external" data-role="button" data-icon="delete">Log out</a> +{% endblock %} + diff --git a/templates/changepw/index_m.html b/templates/changepw/index_m.html new file mode 100644 index 0000000..2c1f5f8 --- /dev/null +++ b/templates/changepw/index_m.html @@ -0,0 +1,32 @@ +{% extends "base_m.html" %} +{% block js %}{% endblock %} +{% block title %}Password Manager{% endblock %} + +{% block header %} +<h1>Password<br />Manager</h1> +{% endblock %} + +{% block content %} +<div style="height:200px;"> +Hello {{ full_name|capfirst }},<br /> +Welcome to the single sign on password manager site. + +<br><br> + +<table> + <tr> + <td>Username:</td><td><b>{{ username }}</b></td> + </tr> +</table> +</div> + +<ul data-role="listview" data-theme="c"> + <li><a href="{% url changepw %}">Change password<br> </a></li> + <li><a href="{% url resetpw %}">Reset password<br> </a></li> +</ul> +{% endblock %} + +{% block footer %} +<a href="{% url logout %}" rel="external" data-role="button" data-icon="delete">Log out</a> +{% endblock %} + diff --git a/templates/changepw/reset_password_m.html b/templates/changepw/reset_password_m.html new file mode 100644 index 0000000..7f1749b --- /dev/null +++ b/templates/changepw/reset_password_m.html @@ -0,0 +1,31 @@ +{% extends "base_m.html" %} +{% block js %}{% endblock %} + +{% block title %}Reset password{% endblock %} + +{% block header %}<h1>Reset password</h1>{% endblock %} + +{% block content %} +{% if not return_value %} + {% if new_password %} + <strong>Username:</strong> {{ username }}/ppp<br /> + <strong>Password:</strong> {{ new_password }} + {% else %} + <form action="{% url resetpw %}" method="post"> + {% csrf_token %} + <input type="submit" value="Reset password" /> + </form> + {% endif %} +{% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> +{% endif %} +{% endblock %} + +{% block footer %} +<a href="{% url index %}" data-role="button" data-icon="back">Back</a> +<a href="{% url logout %}" rel="external" data-role="button" data-icon="delete">Log out</a> +{% endblock %} + + + |