FavoriteCharts update
This commit is contained in:
@@ -211,7 +211,7 @@
|
|||||||
{% if favoritenr > 0 %}
|
{% if favoritenr > 0 %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:-1 }}"><</a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:-1 }}"><</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p> </p>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ maxfav }}"><</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="grid_2">
|
<div class="grid_2">
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
{% if favoritenr < maxfav %}
|
{% if favoritenr < maxfav %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:1 }}">></a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart={{ favoritenr|add:1 }}">></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p> </p>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart=0">></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,37 +3,45 @@
|
|||||||
{% block title %}Change Rower {% endblock %}
|
{% block title %}Change Rower {% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<p style="color: red;">
|
<p style="color: red;">
|
||||||
Please correct the error{{ form.errors|pluralize }} below.
|
Please correct the error{{ form.errors|pluralize }} below.
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="grid_6 alpha">
|
<div class="grid_6 alpha">
|
||||||
<h1>Heart Rate Bands</h1>
|
<h1>Heart Rate Bands</h1>
|
||||||
|
|
||||||
|
<form enctype="multipart/form-data" action="" method="post">
|
||||||
|
<table>
|
||||||
|
{{ form.as_table }}
|
||||||
|
</table>
|
||||||
|
{% csrf_token %}
|
||||||
|
<div class="grid_2 prefix_2 suffix_2">
|
||||||
|
<input class="button green" type="submit" value="Save">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid_6 omega">
|
||||||
|
<h1>Functional Threshold Power</h1>
|
||||||
|
<p>
|
||||||
<form enctype="multipart/form-data" action="" method="post">
|
<form enctype="multipart/form-data" action="" method="post">
|
||||||
<table>
|
<table>
|
||||||
{{ form.as_table }}
|
|
||||||
</table>
|
|
||||||
{% csrf_token %}
|
|
||||||
<div class="grid_2 prefix_2 suffix_2">
|
|
||||||
<input class="button green" type="submit" value="Save">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid_6 omega">
|
|
||||||
<h1>Functional Threshold Power</h1>
|
|
||||||
<p>
|
|
||||||
<form enctype="multipart/form-data" action="" method="post">
|
|
||||||
<table>
|
|
||||||
{{ powerform.as_table }}
|
{{ powerform.as_table }}
|
||||||
</table>
|
</table>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="grid_2 prefix_2 suffix_2">
|
<div class="grid_2 prefix_2 suffix_2">
|
||||||
<input class="button green" type="submit" value="Save">
|
<input class="button green" type="submit" value="Save">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="grid_6 prefix_6 alpha">
|
||||||
|
<div class="grid_2 suffix_4 alpha">
|
||||||
|
<a class="button gray small" href="/rowers/me/favoritecharts">Manage Favorite Charts</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -2660,7 +2660,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
if request.method == 'POST' and 'savefavorite' in request.POST:
|
if request.method == 'POST' and 'savefavorite' in request.POST:
|
||||||
f = FavoriteChart(user=r,xparam=xparam,
|
f = FavoriteChart(user=r,xparam=xparam,
|
||||||
yparam1=yparam1,yparam2=yparam2,
|
yparam1=yparam1,yparam2=yparam2,
|
||||||
plottype=plottype)
|
plottype=plottype,workouttype=workouttype)
|
||||||
f.save()
|
f.save()
|
||||||
if request.method == 'POST' and 'workstrokesonly' in request.POST:
|
if request.method == 'POST' and 'workstrokesonly' in request.POST:
|
||||||
workstrokesonly = request.POST['workstrokesonly']
|
workstrokesonly = request.POST['workstrokesonly']
|
||||||
|
|||||||
Reference in New Issue
Block a user