expanded boat types & classes
This commit is contained in:
@@ -521,7 +521,7 @@ class TrendFlexModalForm(forms.Form):
|
||||
initial='all')
|
||||
waterboattype = forms.MultipleChoiceField(choices=boattypes,
|
||||
label='Water Boat Type',
|
||||
initial = ['1x','2x','2-','4x','4-','8+'])
|
||||
initial = types.waterboattype)
|
||||
|
||||
|
||||
# This form sets options for the summary stats page
|
||||
@@ -531,15 +531,21 @@ class StatsOptionsForm(forms.Form):
|
||||
waterboattype = forms.MultipleChoiceField(choices=boattypes,
|
||||
label='Water Boat Type',
|
||||
widget=forms.CheckboxSelectMultiple(),
|
||||
initial = ['1x','2x','2-','4x','4-','8+'])
|
||||
rower = forms.BooleanField(initial=True,required=False)
|
||||
dynamic = forms.BooleanField(initial=True,required=False)
|
||||
slides = forms.BooleanField(initial=True,required=False)
|
||||
skierg = forms.BooleanField(initial=False,required=False)
|
||||
paddle = forms.BooleanField(initial=False,required=False)
|
||||
snow = forms.BooleanField(initial=False,required=False)
|
||||
coastal = forms.BooleanField(initial=False,required=False)
|
||||
other = forms.BooleanField(initial=False,required=False)
|
||||
initial = types.waterboattype)
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(StatsOptionsForm, self).__init__(*args,**kwargs)
|
||||
|
||||
for type in types.checktypes:
|
||||
self.fields[type] = forms.BooleanField(initial=True,required=False)
|
||||
|
||||
# rower = forms.BooleanField(initial=True,required=False)
|
||||
# dynamic = forms.BooleanField(initial=True,required=False)
|
||||
# slides = forms.BooleanField(initial=True,required=False)
|
||||
# skierg = forms.BooleanField(initial=False,required=False)
|
||||
# paddle = forms.BooleanField(initial=False,required=False)
|
||||
# snow = forms.BooleanField(initial=False,required=False)
|
||||
# coastal = forms.BooleanField(initial=False,required=False)
|
||||
# other = forms.BooleanField(initial=False,required=False)
|
||||
|
||||
class CourseSelectForm(forms.Form):
|
||||
course = forms.ModelChoiceField(queryset=GeoCourse.objects.all())
|
||||
@@ -706,6 +712,8 @@ class WorkoutSessionSelectForm(forms.Form):
|
||||
|
||||
|
||||
class RaceResultFilterForm(forms.Form):
|
||||
boatclasses = (type for type in types.workouttypes if type[0] in types.otwtypes)
|
||||
boatclassinitial = [t for t in types.otwtypes]
|
||||
sexchoices = (
|
||||
('female','Female'),
|
||||
('male','Male'),
|
||||
@@ -723,11 +731,17 @@ class RaceResultFilterForm(forms.Form):
|
||||
initial=['male','female','mixed'],
|
||||
label='Gender',
|
||||
widget=forms.CheckboxSelectMultiple())
|
||||
|
||||
boatclass = forms.MultipleChoiceField(
|
||||
choices=boatclasses,
|
||||
initial=boatclassinitial,
|
||||
label='Boat Class',
|
||||
widget=forms.CheckboxSelectMultiple())
|
||||
|
||||
boattype = forms.MultipleChoiceField(
|
||||
choices=boattypes,
|
||||
label='Boat Type',
|
||||
initial=['1x','2x','2-','4x','4-','8+'],
|
||||
initial=types.waterboattype,
|
||||
widget=forms.CheckboxSelectMultiple())
|
||||
|
||||
age_min = forms.IntegerField(label='Min Age',initial=16)
|
||||
|
||||
Reference in New Issue
Block a user