Merge tag 'v6.90' into develop
more sticky rankingonly
This commit is contained in:
@@ -531,7 +531,7 @@ class TrendFlexModalForm(forms.Form):
|
|||||||
class StatsOptionsForm(forms.Form):
|
class StatsOptionsForm(forms.Form):
|
||||||
includereststrokes = forms.BooleanField(initial=False,label='Include Rest Strokes',required=False)
|
includereststrokes = forms.BooleanField(initial=False,label='Include Rest Strokes',required=False)
|
||||||
rankingonly = forms.BooleanField(initial=False,
|
rankingonly = forms.BooleanField(initial=False,
|
||||||
label='Only Ranking Pieces',required=True)
|
label='Only Ranking Pieces',required=False)
|
||||||
water = forms.BooleanField(initial=False,required=False)
|
water = forms.BooleanField(initial=False,required=False)
|
||||||
waterboattype = forms.MultipleChoiceField(choices=boattypes,
|
waterboattype = forms.MultipleChoiceField(choices=boattypes,
|
||||||
label='Water Boat Type',
|
label='Water Boat Type',
|
||||||
|
|||||||
@@ -5870,7 +5870,8 @@ def user_multiflex_select(request,
|
|||||||
|
|
||||||
modalityform = TrendFlexModalForm(initial={
|
modalityform = TrendFlexModalForm(initial={
|
||||||
'modality':modality,
|
'modality':modality,
|
||||||
'waterboattype':waterboattype
|
'waterboattype':waterboattype,
|
||||||
|
'rankingonly':rankingonly,
|
||||||
})
|
})
|
||||||
|
|
||||||
messages.info(request,successmessage)
|
messages.info(request,successmessage)
|
||||||
@@ -5881,6 +5882,11 @@ def user_multiflex_select(request,
|
|||||||
request.session['startdate'] = startdatestring
|
request.session['startdate'] = startdatestring
|
||||||
request.session['enddate'] = enddatestring
|
request.session['enddate'] = enddatestring
|
||||||
|
|
||||||
|
request.session['waterboattype'] = waterboattype
|
||||||
|
request.session['rankingonly'] = rankingonly
|
||||||
|
request.session['modalities'] = modalities
|
||||||
|
|
||||||
|
|
||||||
return render(request, 'user_multiflex_select.html',
|
return render(request, 'user_multiflex_select.html',
|
||||||
{'workouts': workouts,
|
{'workouts': workouts,
|
||||||
'dateform':dateform,
|
'dateform':dateform,
|
||||||
@@ -6353,12 +6359,14 @@ def user_boxplot_select(request,
|
|||||||
for type in types.checktypes:
|
for type in types.checktypes:
|
||||||
if optionsform.cleaned_data[type]:
|
if optionsform.cleaned_data[type]:
|
||||||
workouttypes.append(type)
|
workouttypes.append(type)
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
'workouttypes':workouttypes,
|
'workouttypes':workouttypes,
|
||||||
'waterboattype':waterboattype,
|
'waterboattype':waterboattype,
|
||||||
'rankingonly':rankingonly,
|
'rankingonly':rankingonly,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
request.session['options'] = options
|
request.session['options'] = options
|
||||||
|
|
||||||
|
|
||||||
@@ -6434,6 +6442,7 @@ def user_boxplot_select(request,
|
|||||||
# set options form correctly
|
# set options form correctly
|
||||||
initial = {}
|
initial = {}
|
||||||
initial['waterboattype'] = waterboattype
|
initial['waterboattype'] = waterboattype
|
||||||
|
initial['rankingonly'] = rankingonly
|
||||||
|
|
||||||
for wtype in types.checktypes:
|
for wtype in types.checktypes:
|
||||||
if wtype in workouttypes:
|
if wtype in workouttypes:
|
||||||
@@ -6441,6 +6450,7 @@ def user_boxplot_select(request,
|
|||||||
else:
|
else:
|
||||||
initial[wtype] = False
|
initial[wtype] = False
|
||||||
|
|
||||||
|
|
||||||
optionsform = StatsOptionsForm(initial=initial)
|
optionsform = StatsOptionsForm(initial=initial)
|
||||||
|
|
||||||
messages.info(request,successmessage)
|
messages.info(request,successmessage)
|
||||||
@@ -6564,6 +6574,7 @@ def boxplot_view_data(request,userid=0,
|
|||||||
def boxplot_view(request,userid=0,
|
def boxplot_view(request,userid=0,
|
||||||
options={
|
options={
|
||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
|
'rankingonly':False,
|
||||||
}):
|
}):
|
||||||
|
|
||||||
if 'options' in request.session:
|
if 'options' in request.session:
|
||||||
@@ -6574,6 +6585,12 @@ def boxplot_view(request,userid=0,
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
includereststrokes = False
|
includereststrokes = False
|
||||||
options['includereststrokes'] = False
|
options['includereststrokes'] = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
rankingonly = options['rankingonly']
|
||||||
|
except KeyError:
|
||||||
|
rankingonly = False
|
||||||
|
options['rankingonly'] = False
|
||||||
|
|
||||||
workstrokesonly = not includereststrokes
|
workstrokesonly = not includereststrokes
|
||||||
|
|
||||||
@@ -6631,6 +6648,7 @@ def boxplot_view(request,userid=0,
|
|||||||
options['ids'] = ids
|
options['ids'] = ids
|
||||||
options['userid'] = userid
|
options['userid'] = userid
|
||||||
options['plotfield'] = plotfield
|
options['plotfield'] = plotfield
|
||||||
|
options['rankingonly'] = rankingonly
|
||||||
|
|
||||||
request.session['options'] = options
|
request.session['options'] = options
|
||||||
|
|
||||||
@@ -8044,6 +8062,7 @@ def cumstats(request,theuser=0,
|
|||||||
initial = {}
|
initial = {}
|
||||||
initial['includereststrokes'] = includereststrokes
|
initial['includereststrokes'] = includereststrokes
|
||||||
initial['waterboattype'] = waterboattype
|
initial['waterboattype'] = waterboattype
|
||||||
|
initial['rankingonly'] = rankingonly
|
||||||
|
|
||||||
for wtype in types.checktypes:
|
for wtype in types.checktypes:
|
||||||
if wtype in workouttypes:
|
if wtype in workouttypes:
|
||||||
|
|||||||
Reference in New Issue
Block a user