gdpr-optin
This commit is contained in:
@@ -181,7 +181,7 @@ def interactive_boxchart(datadf,fieldname,extratitle=''):
|
||||
tools=TOOLS,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False,
|
||||
x_mapper_type='datetime')
|
||||
x_mapper_type='datetime',plot_width=920)
|
||||
|
||||
yrange1 = Range1d(start=yaxminima[fieldname],end=yaxmaxima[fieldname])
|
||||
plot.y_range = yrange1
|
||||
@@ -2365,7 +2365,7 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||
plot = Figure(x_axis_type=x_axis_type,y_axis_type=y_axis_type,
|
||||
tools=TOOLS,
|
||||
toolbar_location="above",
|
||||
toolbar_sticky=False) #,plot_width=500,plot_height=500)
|
||||
toolbar_sticky=False,plot_width=920)
|
||||
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
|
||||
@@ -1,53 +1,52 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}GDPR Opt-In{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid_12">
|
||||
<h2>GDPR Opt-In</h2>
|
||||
<p>
|
||||
<b>
|
||||
To comply with the European Union General Data Protection Regulation,
|
||||
we need to record your consent to use personal data on this website.
|
||||
Please take some time to review our data policies. If you agree and
|
||||
opt in, click the green button at the bottom to be taken to the site.
|
||||
If you do not agree, please use the red button to delete your
|
||||
account. This will irreversibly delete all your data on rowsandall.com
|
||||
and remove your account.
|
||||
</b>
|
||||
</p>
|
||||
<hr>
|
||||
{% block main %}
|
||||
<h2>GDPR Opt-In</h2>
|
||||
<p>
|
||||
<b>
|
||||
To comply with the European Union General Data Protection Regulation,
|
||||
we need to record your consent to use personal data on this website.
|
||||
Please take some time to review our data policies. If you agree and
|
||||
opt in, click the green button at the bottom to be taken to the site.
|
||||
If you do not agree, please use the red button to delete your
|
||||
account. This will irreversibly delete all your data on rowsandall.com
|
||||
and remove your account.
|
||||
</b>
|
||||
</p>
|
||||
<hr>
|
||||
|
||||
{% include "privacypolicy.html" %}
|
||||
{% include "privacypolicy.html" %}
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
To start or continue using the site, please give your consent by clicking on the green Opt In button below.
|
||||
</p>
|
||||
<p>
|
||||
To start or continue using the site, please give your consent by clicking on the green Opt In button below.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<div class="grid_2 suffix_10 alpha">
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/exportallworkouts">Download your data</a>
|
||||
</p>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<div class="grid_2 alpha">
|
||||
<a href="/rowers/me/gdpr-optin-confirm/?next={{ next }}" class="button green small">Opt in and continue</a>
|
||||
</div>
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/exportallworkouts">Download your data</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/me/gdpr-optin-confirm/?next={{ next }}">Opt in and continue</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<form method="POST" action="/rowers/me/delete" class="padding">
|
||||
{% csrf_token %}
|
||||
<input id="id_delete_user" type="hidden" name="delete_user" value="True">
|
||||
<div class="grid_2 prefix_2">
|
||||
<input class="button red small" type="submit" name="action" value="DELETE ACCOUNT">
|
||||
|
||||
</div>
|
||||
<input class="button red small" type="submit" name="action" value="DELETE ACCOUNT">
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</p>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_profile.html' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}View Comparison {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block main %}
|
||||
|
||||
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
||||
<script async="true" type="text/javascript">
|
||||
@@ -15,58 +15,37 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Set things up to resize the plot on a window resize. You can play with
|
||||
// the arguments of resize_width_height() to change the plot's behavior.
|
||||
var plot_resize_setup = function () {
|
||||
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
|
||||
var plot = Bokeh.index[plotid];
|
||||
var plotresizer = function() {
|
||||
// arguments: use width, use height, maintain aspect ratio
|
||||
plot.resize_width_height(true, false, false);
|
||||
};
|
||||
window.addEventListener('resize', plotresizer);
|
||||
plotresizer();
|
||||
};
|
||||
window.addEventListener('load', plot_resize_setup);
|
||||
</script>
|
||||
<style>
|
||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||
html, body {height: 100%; margin:5px;}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="grid_12 alpha">
|
||||
<h1>Trend Flex Chart</h1>
|
||||
<div id="workouts" class="grid_8 alpha">
|
||||
<h1>Trend Flex Chart</h1>
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
|
||||
<div id="id_chart" class="grid_8 alpha flexplot">
|
||||
{{ the_div|safe }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_4 omega">
|
||||
<div class="grid_4">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/{{ userid }}" method="post">
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ userid }}" method="post">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ chartform.as_table }}
|
||||
</table>
|
||||
<div class="grid_1 prefix_2 suffix_1">
|
||||
<p>
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<input name='workoutselectform' class="button green" type="submit" value="Submit">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="grid_4">
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
<p>
|
||||
You can use the form above to change the metric or filter the data.
|
||||
You can use the form to change the metric or filter the data.
|
||||
Set Min SPM and Max SPM to select only strokes in a certain range of
|
||||
stroke rates.
|
||||
Set Work per Stroke to a minimum value to remove "paddle" strokes or turns.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -93,3 +72,7 @@
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_analytics.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
|
||||
hidden.hide();
|
||||
|
||||
|
||||
if (modality.val() == 'water') {
|
||||
hidden.show();
|
||||
}
|
||||
|
||||
// Setup an event listener for when the state of the
|
||||
// checkbox changes.
|
||||
@@ -70,8 +72,14 @@
|
||||
{% endif %}
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="grid_4">
|
||||
<p>You can use the date and search forms to search through all
|
||||
workouts from this team.</p>
|
||||
<p>TIP: Agree with your team members to put tags (e.g. '8x500m') in the notes section of
|
||||
your workouts. That makes it easy to search.</p>
|
||||
</li>
|
||||
<li class="grid_2 maxheight">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/{{ theuser.id }}" method="post">
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex/user/{{ theuser.id }}" method="post">
|
||||
{% if workouts %}
|
||||
|
||||
<input type="checkbox" onClick="toggle(this)" /> Toggle All<br/>
|
||||
@@ -102,16 +110,6 @@
|
||||
<table>
|
||||
{{ dateform.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input name='daterange' class="button green" type="submit" value="Submit">
|
||||
</form>
|
||||
</li>
|
||||
<li class="grid_2">
|
||||
{% if theuser %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/user/{{ theuser.id }}/" method="post">
|
||||
{% else %}
|
||||
<form enctype="multipart/form-data" action="/rowers/user-multiflex-select/" method="post">
|
||||
{% endif %}
|
||||
<table>
|
||||
{{ modalityform.as_table }}
|
||||
</table>
|
||||
@@ -129,12 +127,6 @@
|
||||
</form>
|
||||
</li>
|
||||
|
||||
<li class="grid_2">
|
||||
<p>You can use the date and search forms above to search through all
|
||||
workouts from this team.</p>
|
||||
<p>TIP: Agree with your team members to put tags (e.g. '8x500m') in the notes section of
|
||||
your workouts. That makes it easy to search.</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Deactivate your account{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid_12">
|
||||
{% block main %}
|
||||
<h2>Deactivate your account</h2>
|
||||
<hr>
|
||||
<p>Account deactivation is reversible. After you logout, you will not be
|
||||
@@ -17,6 +16,10 @@
|
||||
<button class="btn btn-primary" type="submit" name="action">Confirm</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_profile.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "newbase.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Delete your account{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid_12">
|
||||
<h2>Delete your account</h2>
|
||||
{% block main %}
|
||||
<h1>Delete your account</h1>
|
||||
<hr>
|
||||
<p><b>Warning: This will remove your account and all your data.
|
||||
You will not be able to recover from this action. We cannot restore
|
||||
@@ -17,6 +16,9 @@
|
||||
<button class="btn btn-primary" type="submit" name="action">Confirm</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu_profile.html' %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -329,9 +329,8 @@ urlpatterns = [
|
||||
url(r'^user-boxplot/user/(?P<userid>\d+)$',views.boxplot_view),
|
||||
url(r'^user-boxplot$',views.boxplot_view),
|
||||
url(r'^user-boxplot-data$',views.boxplot_view_data),
|
||||
url(r'^user-multiflex/(?P<userid>\d+)$',views.multiflex_view),
|
||||
url(r'^user-multiflex/user/(?P<userid>\d+)$',views.multiflex_view),
|
||||
url(r'^user-multiflex/$',views.multiflex_view),
|
||||
url(r'^user-multiflex$',views.multiflex_view),
|
||||
url(r'^user-multiflex-data$',views.multiflex_data),
|
||||
url(r'^me/deactivate$',views.deactivate_user),
|
||||
url(r'^me/delete$',views.remove_user),
|
||||
|
||||
@@ -5437,17 +5437,14 @@ def user_multiflex_select(request,
|
||||
except:
|
||||
ploterrorbars = False
|
||||
|
||||
|
||||
|
||||
# if 'startdate' in request.session:
|
||||
# startdate = iso8601.parse_date(request.session['startdate'])
|
||||
if 'startdate' in request.session:
|
||||
startdate = iso8601.parse_date(request.session['startdate'])
|
||||
|
||||
|
||||
# if 'enddate' in request.session:
|
||||
# enddate = iso8601.parse_date(request.session['enddate'])
|
||||
if 'enddate' in request.session:
|
||||
enddate = iso8601.parse_date(request.session['enddate'])
|
||||
|
||||
|
||||
if 'waterboattype' in request.session:
|
||||
waterboattype = request.session['waterboattype']
|
||||
else:
|
||||
waterboattype = types.waterboattype
|
||||
@@ -5468,7 +5465,7 @@ def user_multiflex_select(request,
|
||||
modalities = [m[0] for m in types.workouttypes]
|
||||
modality = 'all'
|
||||
|
||||
if request.method == 'POST' and 'daterange' in request.POST:
|
||||
if request.method == 'POST':
|
||||
dateform = DateRangeForm(request.POST)
|
||||
if dateform.is_valid():
|
||||
startdate = dateform.cleaned_data['startdate']
|
||||
@@ -5477,13 +5474,6 @@ def user_multiflex_select(request,
|
||||
enddatestring = enddate.strftime('%Y-%m-%d')
|
||||
request.session['startdate'] = startdatestring
|
||||
request.session['enddate'] = enddatestring
|
||||
else:
|
||||
dateform = DateRangeForm(initial={
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
})
|
||||
|
||||
if request.method == 'POST' and 'modality' in request.POST:
|
||||
modalityform = TrendFlexModalForm(request.POST)
|
||||
if modalityform.is_valid():
|
||||
modality = modalityform.cleaned_data['modality']
|
||||
@@ -5501,6 +5491,12 @@ def user_multiflex_select(request,
|
||||
request.session['modalities'] = modalities
|
||||
request.session['waterboattype'] = waterboattype
|
||||
request.session['rankingonly'] = rankingonly
|
||||
else:
|
||||
dateform = DateRangeForm(initial={
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
})
|
||||
|
||||
|
||||
startdate = datetime.datetime.combine(startdate,datetime.time())
|
||||
enddate = datetime.datetime.combine(enddate,datetime.time(23,59,59))
|
||||
@@ -5577,9 +5573,25 @@ def user_multiflex_select(request,
|
||||
request.session['modalities'] = modalities
|
||||
|
||||
|
||||
breadcrumbs = [
|
||||
{
|
||||
'url':'/rowers/analysis',
|
||||
'name':'Analysis'
|
||||
},
|
||||
{
|
||||
'url':reverse(user_multiflex_select,kwargs={'userid':userid}),
|
||||
'name': 'Compare Select'
|
||||
},
|
||||
{
|
||||
'url':reverse(multi_compare_view),
|
||||
'name': 'Comparison Chart'
|
||||
}
|
||||
]
|
||||
|
||||
return render(request, 'user_multiflex_select.html',
|
||||
{'workouts': workouts,
|
||||
'dateform':dateform,
|
||||
'breadcrumbs':breadcrumbs,
|
||||
'startdate':startdate,
|
||||
'enddate':enddate,
|
||||
'theuser':user,
|
||||
@@ -5846,6 +5858,13 @@ def multiflex_view(request,userid=0,
|
||||
except KeyError:
|
||||
palette = 'monochrome_blue'
|
||||
|
||||
if 'startdate' in request.session:
|
||||
startdate = iso8601.parse_date(request.session['startdate'])
|
||||
|
||||
|
||||
if 'enddate' in request.session:
|
||||
enddate = iso8601.parse_date(request.session['enddate'])
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
if userid==0:
|
||||
@@ -5946,10 +5965,30 @@ def multiflex_view(request,userid=0,
|
||||
|
||||
|
||||
request.session['options'] = options
|
||||
|
||||
r = getrequestrower(request,userid=userid)
|
||||
|
||||
breadcrumbs = [
|
||||
{
|
||||
'url':'/rowers/analysis',
|
||||
'name':'Analysis'
|
||||
},
|
||||
{
|
||||
'url':reverse(user_multiflex_select,kwargs={'userid':userid}),
|
||||
'name': 'Trend Flex Select'
|
||||
},
|
||||
{
|
||||
'url':reverse(multiflex_view),
|
||||
'name': 'Trend Flex Chart'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
return render(request,'multiflex.html',
|
||||
{'interactiveplot':'',
|
||||
'active':'nav-analysis',
|
||||
'rower':r,
|
||||
'breadcrumbs':breadcrumbs,
|
||||
'the_div':div,
|
||||
'active':'nav-analysis',
|
||||
'chartform':chartform,
|
||||
@@ -6135,11 +6174,11 @@ def user_boxplot_select(request,
|
||||
request.session['startdate'] = startdatestring
|
||||
request.session['enddate'] = enddatestring
|
||||
|
||||
r = getrower(request.user)
|
||||
|
||||
breadcrumbs = [
|
||||
{
|
||||
'url':'/rowers/list-workouts',
|
||||
'name':'Workouts'
|
||||
'url':'/rowers/analysis',
|
||||
'name':'Analysis'
|
||||
},
|
||||
{
|
||||
'url':reverse(user_boxplot_select,kwargs={'userid':userid}),
|
||||
@@ -6343,8 +6382,8 @@ def boxplot_view(request,userid=0,
|
||||
r = getrequestrower(request,userid=userid)
|
||||
breadcrumbs = [
|
||||
{
|
||||
'url':'/rowers/list-workouts',
|
||||
'name':'Workouts'
|
||||
'url':'/rowers/Analysis',
|
||||
'name':'Analysis'
|
||||
},
|
||||
{
|
||||
'url':reverse(user_boxplot_select,kwargs={'userid':userid}),
|
||||
|
||||
Reference in New Issue
Block a user