toggle rest stroke buttons
This commit is contained in:
@@ -1463,7 +1463,7 @@ def cum_flex(request,theuser=0,
|
||||
})
|
||||
|
||||
@user_passes_test(promember,login_url="/",redirect_field_name=None)
|
||||
def workout_forcecurve_view(request,id=0):
|
||||
def workout_forcecurve_view(request,id=0,workstrokesonly=False):
|
||||
row = Workout.objects.get(id=id)
|
||||
promember=0
|
||||
mayedit=0
|
||||
@@ -1478,7 +1478,15 @@ def workout_forcecurve_view(request,id=0):
|
||||
if not promember:
|
||||
return HttpResponseRedirect("/rowers/about/")
|
||||
|
||||
script,div,js_resources,css_resources = interactive_forcecurve([row])
|
||||
if request.method == 'POST' and 'workstrokesonly' in request.POST:
|
||||
workstrokesonly = request.POST['workstrokesonly']
|
||||
if workstrokesonly == 'True':
|
||||
workstrokesonly = True
|
||||
else:
|
||||
workstrokesonly = False
|
||||
|
||||
script,div,js_resources,css_resources = interactive_forcecurve([row],
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
return render(request,
|
||||
'forcecurve_single.html',
|
||||
@@ -1489,6 +1497,7 @@ def workout_forcecurve_view(request,id=0):
|
||||
'css_res':css_resources,
|
||||
'id':id,
|
||||
'mayedit':mayedit,
|
||||
'workstrokesonly': not workstrokesonly,
|
||||
})
|
||||
|
||||
@login_required()
|
||||
|
||||
Reference in New Issue
Block a user