From 981075fd6834480eb118c3b6b90617a969908750 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 4 Aug 2017 13:07:59 +0200 Subject: [PATCH] added boat type selector to stats and flexall --- rowers/forms.py | 14 +++++++++ rowers/templates/cum_flex.html | 49 +++++++++++++++++++++++++++++ rowers/templates/cumstats.html | 56 ++++++++++++++++++++++++++++++---- rowers/views.py | 17 +++++++++-- 4 files changed, 128 insertions(+), 8 deletions(-) diff --git a/rowers/forms.py b/rowers/forms.py index 4e199518..e64014aa 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -275,10 +275,24 @@ class IntervalUpdateForm(forms.Form): self.fields['type_%s' % i].widget.attrs['style'] = 'width:156px; height: 22px;' self.fields['intervald_%s' % i].widget = forms.TimeInput(format='%H:%M:%S.%f') +boattypes = ( + ('1x', '1x (single)'), + ('2x', '2x (double)'), + ('2-', '2- (pair)'), + ('4x', '4x (quad)'), + ('4-', '4- (four)'), + ('8+', '8+ (eight)'), +) + + # This form sets options for the summary stats page class StatsOptionsForm(forms.Form): includereststrokes = forms.BooleanField(initial=False,label='Include Rest Strokes',required=False) water = forms.BooleanField(initial=False,required=False) + 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) diff --git a/rowers/templates/cum_flex.html b/rowers/templates/cum_flex.html index 4d712ba2..942e5992 100644 --- a/rowers/templates/cum_flex.html +++ b/rowers/templates/cum_flex.html @@ -9,6 +9,55 @@ {{ js_res | safe }} {{ css_res| safe }} + + + - + + + + + + + +{{ plotscript |safe }} + +