Merge branch 'feature/frontpage6' into develop
This commit is contained in:
@@ -957,6 +957,7 @@ class FlexAxesForm(forms.Form):
|
||||
choices=yaxchoices2,label='Right Axis',required=True)
|
||||
|
||||
def __init__(self,request,*args,**kwargs):
|
||||
extrametrics = kwargs.pop('extrametrics',[])
|
||||
super(FlexAxesForm, self).__init__(*args, **kwargs)
|
||||
|
||||
rower = Rower.objects.get(user=request.user)
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
</li>
|
||||
<li style="text-align: center;">
|
||||
<a class="button midden" href="/rowers/register">
|
||||
<h1 class="midden">
|
||||
<div class="rounder whiteborder">SIGN UP FREE</div>
|
||||
<h2 class="midden rounder whiteborder">
|
||||
<div>SIGN UP FREE</div>
|
||||
</h1>
|
||||
</a>
|
||||
</li>
|
||||
@@ -77,9 +77,6 @@
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="grid_5">
|
||||
<h2 class="midden">WHAT WE OFFER</h2>
|
||||
</li>
|
||||
{% for offering in offerings %}
|
||||
<li class="frontitem">
|
||||
<h3 class="midden">{{ offering.name }}</h3>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% endif %}
|
||||
|
||||
<ul class="main-content">
|
||||
<li class="frontitem">
|
||||
<li class="grid_2 frontitem">
|
||||
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
|
||||
+22
-15
@@ -8792,13 +8792,18 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
flexaxesform = FlexAxesForm(request,request.POST)
|
||||
|
||||
print request.POST
|
||||
|
||||
if flexaxesform.is_valid():
|
||||
print 'form valid'
|
||||
cd = flexaxesform.cleaned_data
|
||||
xparam = cd['xaxis']
|
||||
yparam1 = cd['yaxis1']
|
||||
yparam2 = cd['yaxis2']
|
||||
else:
|
||||
print flexaxesform.errors
|
||||
|
||||
print xparam,yparam1,yparam2
|
||||
|
||||
if not promember:
|
||||
for name,d in rowingmetrics:
|
||||
@@ -8814,9 +8819,9 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
messages.info(request,'To use '+d['verbose_name']+', you have to be Pro member')
|
||||
|
||||
# bring back slashes
|
||||
yparam1 = yparam1.replace('_slsh_','/')
|
||||
yparam2 = yparam2.replace('_slsh_','/')
|
||||
xparam = xparam.replace('_slsh_','/')
|
||||
# yparam1 = yparam1.replace('_slsh_','/')
|
||||
# yparam2 = yparam2.replace('_slsh_','/')
|
||||
# xparam = xparam.replace('_slsh_','/')
|
||||
|
||||
# create interactive plot
|
||||
try:
|
||||
@@ -8878,25 +8883,27 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
additionalmetrics = []
|
||||
|
||||
|
||||
extrametrics = {m.replace('/','_slsh_'):m for m in additionalmetrics}
|
||||
# extrametrics = {m.replace('/','_slsh_'):m for m in additionalmetrics}
|
||||
extrametrics = additionalmetrics
|
||||
|
||||
xparam = xparam.replace('/','_slsh_')
|
||||
yparam1 = yparam1.replace('/','_slsh_')
|
||||
yparam2 = yparam2.replace('/','_slsh_')
|
||||
# xparam = xparam.replace('/','_slsh_')
|
||||
# yparam1 = yparam1.replace('/','_slsh_')
|
||||
# yparam2 = yparam2.replace('/','_slsh_')
|
||||
|
||||
|
||||
for metric in nometrics:
|
||||
try:
|
||||
extrametrics.pop(metric)
|
||||
except KeyError:
|
||||
pass
|
||||
# for metric in nometrics:
|
||||
# try:
|
||||
# extrametrics.pop(metric)
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
initial = {
|
||||
'xaxis':xparam,
|
||||
'yaxis1':yparam1,
|
||||
'yaxis2':yparam2
|
||||
'yaxis2':yparam2,
|
||||
}
|
||||
flexaxesform = FlexAxesForm(request,initial=initial)
|
||||
flexaxesform = FlexAxesForm(request,initial=initial,
|
||||
extrametrics=extrametrics)
|
||||
|
||||
initial = {
|
||||
'includereststrokes': not workstrokesonly,
|
||||
|
||||
Reference in New Issue
Block a user