diff options
Diffstat (limited to 'src/apps/changepw/templates')
5 files changed, 221 insertions, 0 deletions
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 %} +<h2>Update your public SSH keys</h2> +{% if return_value == None %} + <form action="{% url changeother %}" method="post" autocomplete="off">{% csrf_token %} + <p>When pasting multiple ssh public keys remember to use new line or a blank line between keys.</p> + <table> + <tr> + <td class="formlabel">Paste your SSH public keys:</td> + </tr> + <tr> + <td class="formfield"> + <textarea name="ssh_key" 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>Your public SSH keys was updated successfully.</p> + {% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> + {% endif %} +{% endif %} +<p> + <a href="{% url index %}">Back</a><br /> + <a href="{% url logout %}">Log out</a> +</p> +{% 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 %} + <script type="text/javascript" src="{% static 'js/jquery/jquery-1.4.4.min.js' %}"></script> + <script type="text/javascript" src="{% static 'js/jquery/password_strength.js' %}"></script> +{% endblock %} +{% block title %}Change {{ pwtype }} password{% endblock %} +{% block content %} +<h2>Change {{ pwtype }} password</h2> +{% 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' pwtype %}" method="post" autocomplete="off">{% csrf_token %} + <table> + <tr> + <th class="formlabel">Username:</th><td>{{ username }}{% if pwtype == "ppp" %}/ppp{% endif %}</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 {{ pwtype }} password was changed successfully.</p> + {% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> + {% endif %} +{% endif %} +<p> + <a href="{% url 'index' %}">Back</a><br /> + <a href="{% url 'logout' %}">Log out</a> +</p> +{% 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 %} + <p>Your public SSH keys where updated successfully.</p> + {% endif %} + + <h2>Your existing public SSH keys</h2> + <table border="1px"> + {% for key in ssh_keys %} + <tr> + <td><div style="width:500px;word-wrap:break-word;">{{ key }}</div></td> + <td><a href="{% url 'deletepublicsshkey' key_number=forloop.counter0 %}">Delete</a></td> + </tr> + {% endfor %} + </table> + <h2>Update your public SSH keys</h2> + <form action="{% url 'changepublicsshkeys' %}" method="post" autocomplete="off">{% csrf_token %} + <table> + <tr> + <td class="formlabel">Paste your SSH public keys (one key per line):</td> + </tr> + <tr> + <td class="formfield"> + <textarea name="ssh_key" cols="70" rows="10"></textarea> + </td> + </tr> + <tr> + <td class="formbutton"><input type="submit" value="Submit" /></td> + </tr> + </table> + </form> +{% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> +{% endif %} +<p> + <a href="{% url 'index' %}">Back</a><br /> + <a href="{% url 'logout' %}">Log out</a> +</p> +{% 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 %} +<h2>SSO Password Manager</h2> +<p> + Hello {{ full_name|capfirst }},<br /> + Welcome to the single sign on password manager site. +</p> + +<table> + <tr> + <th>Your usernames</th><th></th> + </tr> + <tr> + <td>SSO username:</td><td>{{ username }}</td> + </tr> + <tr> + <td><!-- VPN and -->eduroam username:</td><td>{{ username }}/ppp</td> + </tr> +</table> + +<p> +Available actions:<br /> +<a href="{% url 'changepw' "sso" %}">Change single sign on (SSO) password</a><br /> +{% if user.is_staff %} + <a href="{% url 'changepw' "net" %}">Change TACACS password</a><br /> +{% endif %} +{% if user.is_active or user.is_staff %} + <a href="{% url 'changepw' "ppp" %}">Change <!-- VPN and -->eduroam password</a><br /> +{% endif %} +{% if user.is_staff %} + <a href="{% url 'changepublicsshkeys' %}">Update your public SSH keys</a><br /> + <a href="{% url 'ideviceconf' %}" rel="external">Configure eduroam on your iDevice</a> +{% endif %} +</p> + +<p><a href="{% url 'logout' %}">Log out</a></p> +{% 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 <!--VPN and -->eduroam password{% endblock %} +{% block content %} +<h2>Reset <!--VPN and -->eduroam password</h2> +{% if not return_value %} + <table> + <tr> + <th>Username:</th><td>{{ username }}/ppp</td> + </tr> + {% if new_password %} + <tr> + <th>Password:</th><td>{{ new_password }}</td> + </tr> + {% else %} + <tr> + <th>Password:</th> + <td> + <form action="{% url resetpw %}" method="post"> + {% csrf_token %} + <input type="submit" value="Reset" /> + </form> + </td> + </tr> + {% endif %} + </table> + <p> +<!-- + <a href="https://portal.nordu.net/display/nordunet/VPN+Access" target="_blank">Guide to VPN setup</a><br /> +--> + <a href="https://portal.nordu.net/display/nordunet/Wireless+roaming+via+eduroam" target="_blank">Guide to eduroam setup</a> + </p> +{% else %} + <p>Something went wrong. Please contact an administrator.</p> + <p>Return code: {{ return_value }}</p> +{% endif %} + +<p> + <a href="{% url index %}">Back</a><br /> + <a href="{% url logout %}">Log out</a> +</p> +{% endblock %} + |