submitting race result when arriving at upload page from race page
This commit is contained in:
@@ -385,6 +385,7 @@ class UploadOptionsForm(forms.Form):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.request = kwargs.pop('request',None)
|
||||
raceid = kwargs.pop('raceid',0)
|
||||
super(UploadOptionsForm, self).__init__(*args, **kwargs)
|
||||
r = Rower.objects.get(user=self.request.user)
|
||||
races = VirtualRace.objects.filter(
|
||||
@@ -405,6 +406,9 @@ class UploadOptionsForm(forms.Form):
|
||||
else:
|
||||
del self.fields['submitrace']
|
||||
|
||||
if int(raceid) in raceids:
|
||||
self.fields['submitrace'].initial = VirtualRace.objects.get(id=raceid)
|
||||
|
||||
# The form to indicate additional actions to be performed immediately
|
||||
# after a successful upload. This version allows the Team manager to select
|
||||
# a team member
|
||||
|
||||
Reference in New Issue
Block a user