instroke
This commit is contained in:
@@ -148,6 +148,20 @@ class InstantPlanSelectForm(forms.Form):
|
||||
self.fields['enddate'].initial = timezone.now(
|
||||
)+datetime.timedelta(days=instantplan.duration)
|
||||
|
||||
# Instroke Metrics interactive chart form
|
||||
class InstrokeForm(forms.Form):
|
||||
metric = forms.ChoiceField(label='metric',choices=(('a','a'),('b','b')))
|
||||
spm_min = forms.IntegerField(initial=15,label='SPM Min')
|
||||
spm_max = forms.IntegerField(initial=45,label='SPM Max')
|
||||
|
||||
def __init__(self, *args, **kwargs): # pragma: no cover
|
||||
choices = kwargs.pop('choices', [])
|
||||
super(InstrokeForm, self).__init__(*args, **kwargs)
|
||||
if len(choices) > 0:
|
||||
choices = [(choice, choice) for choice in choices]
|
||||
self.fields['metric'].choices = choices
|
||||
self.fields['metric'].initial = choices[0]
|
||||
|
||||
|
||||
# Video Analysis creation form
|
||||
class VideoAnalysisCreateForm(forms.Form):
|
||||
|
||||
Reference in New Issue
Block a user