initial modality form
This commit is contained in:
@@ -8,7 +8,7 @@ from django.forms.extras.widgets import SelectDateWidget
|
||||
from django.utils import timezone,translation
|
||||
from django.forms import ModelForm
|
||||
import dataprep
|
||||
|
||||
import types
|
||||
import datetime
|
||||
|
||||
# login form
|
||||
@@ -45,18 +45,6 @@ class StrokeDataForm(forms.Form):
|
||||
|
||||
# The form used for uploading files
|
||||
class DocumentsForm(forms.Form):
|
||||
filetypechoices = (
|
||||
('csv' , 'Painsled iOS CSV'),
|
||||
('tcx' , 'TCX'),
|
||||
('tcxnohr' , 'TCX No HR'),
|
||||
('rp' , 'RowPro CSV'),
|
||||
('speedcoach' , 'SpeedCoach GPS CSV'),
|
||||
('speedcoach2' , 'SpeedCoach GPS 2 CSV'),
|
||||
('ergdata' , 'ErgData CSV'),
|
||||
('ergstick' , 'ErgStick CSV'),
|
||||
('painsleddesktop' , 'Painsled Desktop CSV'),
|
||||
('zip','Zipped file'),
|
||||
)
|
||||
title = forms.CharField(required=False)
|
||||
file = forms.FileField(required=True,
|
||||
validators=[validate_file_extension])
|
||||
@@ -275,15 +263,17 @@ 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)'),
|
||||
)
|
||||
boattypes = types.boattypes
|
||||
workouttypes = types.workouttypes
|
||||
|
||||
# form to select modality and boat type for trend flex
|
||||
class TrendFlexModalForm(forms.Form):
|
||||
modality = forms.ChoiceField(choices=workouttypes,
|
||||
label='Workout Type')
|
||||
waterboattype = forms.MultipleChoiceField(choices=boattypes,
|
||||
label='Water Boat Type',
|
||||
initial = ['1x','2x','2-','4x','4-','8+'])
|
||||
|
||||
|
||||
# This form sets options for the summary stats page
|
||||
class StatsOptionsForm(forms.Form):
|
||||
@@ -342,7 +332,6 @@ formaxlabelsmultiflex['workoutid'] = 'Workout'
|
||||
parchoicesmultiflex = list(sorted(formaxlabelsmultiflex.items(), key = lambda x:x[1]))
|
||||
|
||||
from utils import palettes
|
||||
#palettechoices = { key:key for key, value in palettes.iteritems() }
|
||||
|
||||
palettechoices = tuple((p,p) for p in palettes.keys())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user