Private
Public Access
1
0
Files
rowsandall/rowers/templates/rower_form.html
Sander Roosendaal 6742f81fe3 showing discounts
2021-11-11 11:09:27 +01:00

129 lines
3.1 KiB
HTML

{% extends "newbase.html" %}
{% load static %}
{% 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 href="/password_change/">Password Change</a>
{% else %}
&nbsp;
{% endif %}
</p>
<p>
Login <em>{{ rower.user }}</em>
</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>&nbsp;</th><td></td>
</tr>
<tr>
<th>Plan</th><td>{{ rower.paidplan.name }}</td>
</tr>
{% if rower.rowerplan != 'basic' %}
<tr>
<th>
{% if rower.paymenttype != 'recurring' %}
Plan Expiry
{% else %}
Next Payment Due
{% endif %}
</th><td>{{ rower.planexpires }}</td>
</tr>
{% if rower.eurocredits %}
<tr>
<th>Discount voucher for training plans</th>
<td>{{ rower.eurocredits }}&euro;</td>
</tr>
{% endif %}
{% endif %}
</table>
{% csrf_token %}
{% if rower.rowerplan != 'coach' and rower.user == user %}
<p>
<a href="/rowers/paidplans/">Upgrade</a>
</p>
{% else %}
<p>
&nbsp;
</p>
{% endif %}
{% if rower.rowerplan != 'basic' and rower.user == user %}
<p>
<a href="/rowers/me/cancelsubscriptions/">Cancel Subscription</a>
</p>
{% endif %}
<input type="submit" value="Save">
</form>
</li>
{% if rower.user == user %}
<li class="grid_2">
<h2>GDPR - Data Protection</h2>
<p>
<a href="/rowers/exportallworkouts/">Download your data</a>
</p>
<p>
<a 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 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 %}