100 lines
2.5 KiB
HTML
100 lines
2.5 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Change Rower {% endblock %}
|
|
|
|
{% block main %}
|
|
<h1>User Settings for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
|
|
|
<p><a href="http://analytics.rowsandall.com/2017/11/02/rowsandall-settings-page-tutorial/">Need help? Click to read the tutorial</a></p>
|
|
|
|
<ul class="main-content">
|
|
<li class="grid_2">
|
|
<h2>Account Information</h2>
|
|
<p>
|
|
{% if rower.user == user %}
|
|
<a class="button blue small" href="/password_change/">Password Change</a>
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
</p>
|
|
{% if userform.errors %}
|
|
<p style="color: red;">
|
|
Please correct the error{{ form.errors|pluralize }} below.
|
|
</p>
|
|
{% endif %}
|
|
{% if accountform.errors %}
|
|
<p style="color: red;">
|
|
|
|
</p>
|
|
{% endif %}
|
|
<form enctype="multipart/form-data" action="" method="post">
|
|
<table>
|
|
{{ userform.as_table }}
|
|
{{ accountform.as_table }}
|
|
<tr>
|
|
<th>Plan</th><td>{{ rower.rowerplan }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Plan Expiry</th><td>{{ rower.planexpires }}</td>
|
|
</tr>
|
|
</table>
|
|
{% csrf_token %}
|
|
{% if rower.rowerplan == 'basic' and rower.user == user %}
|
|
<a class="button blue" href="/rowers/promembership">Upgrade</a>
|
|
{% else %}
|
|
|
|
{% endif %}
|
|
<input class="button green" type="submit" value="Save">
|
|
</form>
|
|
</li>
|
|
{% if rower.user == user %}
|
|
<li class="grid_2">
|
|
<h2>GDPR - Data Protection</h2>
|
|
<p>
|
|
<a class="button blue small" href="/rowers/exportallworkouts">Download your data</a>
|
|
</p>
|
|
<p>
|
|
<a class="button blue small" href="/rowers/me/deactivate">Deactivate Account</a>
|
|
</p>
|
|
<p>
|
|
<a class="button red small" href="/rowers/me/delete">Delete Account</a>
|
|
</p>
|
|
</li>
|
|
<li class="grid_2">
|
|
{% if grants %}
|
|
<h2>Applications</h2>
|
|
<table width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th>Application</th>
|
|
<th>Scope</th>
|
|
<th>Revoke</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for grant in grants %}
|
|
<tr>
|
|
<td>{{ grant.application }}</td>
|
|
<td>{{ grant.scope }}</td>
|
|
<td>
|
|
<a class="button red small" href="/rowers/me/revokeapp/{{ grant.application.id }}">Revoke</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_profile.html' %}
|
|
{% endblock %}
|