From 934702f61f1cbdbf001ebb598c22c75efa247645 Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Fri, 2 Jun 2017 13:19:30 +0200 Subject: Django 1.11 compatible and cleaned up --- .../changepw/templates/changepw/change_other.html | 37 +++++++++++++++ .../templates/changepw/change_password.html | 54 ++++++++++++++++++++++ .../templates/changepw/change_public_ssh_key.html | 45 ++++++++++++++++++ src/apps/changepw/templates/changepw/index.html | 41 ++++++++++++++++ .../templates/changepw/reset_password.html | 44 ++++++++++++++++++ 5 files changed, 221 insertions(+) create mode 100644 src/apps/changepw/templates/changepw/change_other.html create mode 100644 src/apps/changepw/templates/changepw/change_password.html create mode 100644 src/apps/changepw/templates/changepw/change_public_ssh_key.html create mode 100644 src/apps/changepw/templates/changepw/index.html create mode 100644 src/apps/changepw/templates/changepw/reset_password.html (limited to 'src/apps/changepw/templates') diff --git a/src/apps/changepw/templates/changepw/change_other.html b/src/apps/changepw/templates/changepw/change_other.html new file mode 100644 index 0000000..0979e84 --- /dev/null +++ b/src/apps/changepw/templates/changepw/change_other.html @@ -0,0 +1,37 @@ +{% extends "base.html" %} +{% block js %} +{% endblock %} +{% block title %}Update public SSH keys{% endblock %} +{% block content %} +

Update your public SSH keys

+{% if return_value == None %} +
{% csrf_token %} +

When pasting multiple ssh public keys remember to use new line or a blank line between keys.

+ + + + + + + + + + +
Paste your SSH public keys:
+ +
+
+{% else %} + {% if return_value == 0 %} +

Your public SSH keys was updated successfully.

+ {% else %} +

Something went wrong. Please contact an administrator.

+

Return code: {{ return_value }}

+ {% endif %} +{% endif %} +

+ Back
+ Log out +

+{% endblock %} + diff --git a/src/apps/changepw/templates/changepw/change_password.html b/src/apps/changepw/templates/changepw/change_password.html new file mode 100644 index 0000000..5017b4c --- /dev/null +++ b/src/apps/changepw/templates/changepw/change_password.html @@ -0,0 +1,54 @@ +{% extends "base.html" %} +{% load static %} +{% block js %} + + +{% endblock %} +{% block title %}Change {{ pwtype }} password{% endblock %} +{% block content %} +

Change {{ pwtype }} password

+{% if form %} +

When thinking of a new password you need to remember to use:

+ + +

+ {{ form.non_field_errors }} +

+
{% csrf_token %} + + + + + {% for field in form %} + + + + + + + {% endfor %} +
Username:{{ username }}{% if pwtype == "ppp" %}/ppp{% endif %}
{{ field.errors }}
{{ field.label_tag }}:{{ field }}
+ +
+ +{% else %} + {% if return_value == 0 %} +

Your {{ pwtype }} password was changed successfully.

+ {% else %} +

Something went wrong. Please contact an administrator.

+

Return code: {{ return_value }}

+ {% endif %} +{% endif %} +

+ Back
+ Log out +

+{% endblock %} diff --git a/src/apps/changepw/templates/changepw/change_public_ssh_key.html b/src/apps/changepw/templates/changepw/change_public_ssh_key.html new file mode 100644 index 0000000..0ad6533 --- /dev/null +++ b/src/apps/changepw/templates/changepw/change_public_ssh_key.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} +{% block js %} +{% endblock %} +{% block title %}Update public SSH keys{% endblock %} +{% block content %} + +{% if return_value == 0 or return_value == None %} + {% if return_value == 0 %} +

Your public SSH keys where updated successfully.

+ {% endif %} + +

Your existing public SSH keys

+ + {% for key in ssh_keys %} + + + + + {% endfor %} +
{{ key }}
Delete
+

Update your public SSH keys

+
{% csrf_token %} + + + + + + + + + + +
Paste your SSH public keys (one key per line):
+ +
+
+{% else %} +

Something went wrong. Please contact an administrator.

+

Return code: {{ return_value }}

+{% endif %} +

+ Back
+ Log out +

+{% endblock %} diff --git a/src/apps/changepw/templates/changepw/index.html b/src/apps/changepw/templates/changepw/index.html new file mode 100644 index 0000000..12df371 --- /dev/null +++ b/src/apps/changepw/templates/changepw/index.html @@ -0,0 +1,41 @@ +{% extends "base.html" %} +{% block js %} +{% endblock %} +{% block title %}SSO Password Manager{% endblock %} +{% block content %} +

SSO Password Manager

+

+ Hello {{ full_name|capfirst }},
+ Welcome to the single sign on password manager site. +

+ + + + + + + + + + + +
Your usernames
SSO username:{{ username }}
eduroam username:{{ username }}/ppp
+ +

+Available actions:
+Change single sign on (SSO) password
+{% if user.is_staff %} + Change TACACS password
+{% endif %} +{% if user.is_active or user.is_staff %} + Change eduroam password
+{% endif %} +{% if user.is_staff %} + Update your public SSH keys
+ Configure eduroam on your iDevice +{% endif %} +

+ +

Log out

+{% endblock %} + diff --git a/src/apps/changepw/templates/changepw/reset_password.html b/src/apps/changepw/templates/changepw/reset_password.html new file mode 100644 index 0000000..c56b920 --- /dev/null +++ b/src/apps/changepw/templates/changepw/reset_password.html @@ -0,0 +1,44 @@ +{% extends "base.html" %} +{% block js %} +{% endblock %} +{% block title %}Reset eduroam password{% endblock %} +{% block content %} +

Reset eduroam password

+{% if not return_value %} + + + + + {% if new_password %} + + + + {% else %} + + + + + {% endif %} +
Username:{{ username }}/ppp
Password:{{ new_password }}
Password: +
+ {% csrf_token %} + +
+
+

+ + Guide to eduroam setup +

+{% else %} +

Something went wrong. Please contact an administrator.

+

Return code: {{ return_value }}

+{% endif %} + +

+ Back
+ Log out +

+{% endblock %} + -- cgit v1.1