adding Standard Times to events
This commit is contained in:
@@ -529,6 +529,11 @@ def standards_upload_view(request,id=0):
|
||||
is_ajax = True
|
||||
r = getrower(request.user)
|
||||
|
||||
if id != 0:
|
||||
collection = StandardCollection.objects.get(id=id)
|
||||
if request.user != collection.manager:
|
||||
raise PermissionDenied("You cannot change this set of time standards")
|
||||
|
||||
|
||||
if request.method == 'POST':
|
||||
form = StandardsForm(request.POST,request.FILES)
|
||||
@@ -573,6 +578,12 @@ def standards_upload_view(request,id=0):
|
||||
else:
|
||||
if not is_ajax:
|
||||
form = StandardsForm()
|
||||
if id != 0:
|
||||
collection = StandardCollection.objects.get(id=id)
|
||||
form = StandardsForm(initial={
|
||||
'name':collection.name,
|
||||
'notes': collection.notes,
|
||||
})
|
||||
return render(request,'standard_form.html',
|
||||
{'form':form,
|
||||
'active':'nav-racing',
|
||||
@@ -655,7 +666,6 @@ def virtualevents_view(request):
|
||||
country__in=countries
|
||||
).order_by("startdate","start_time")
|
||||
else:
|
||||
|
||||
form = VirtualRaceSelectForm()
|
||||
|
||||
if is_ajax:
|
||||
@@ -1938,6 +1948,7 @@ def indoorvirtualevent_create_view(request):
|
||||
evaluation_closure = cd['evaluation_closure']
|
||||
contact_phone = cd['contact_phone']
|
||||
contact_email = cd['contact_email']
|
||||
coursestandards = cd['coursestandards']
|
||||
|
||||
# correct times
|
||||
|
||||
@@ -1992,6 +2003,7 @@ def indoorvirtualevent_create_view(request):
|
||||
sessionvalue = sessionvalue,
|
||||
course=None,
|
||||
timezone=timezone_str,
|
||||
coursestandards=coursestandards,
|
||||
evaluation_closure=evaluation_closure,
|
||||
registration_closure=registration_closure,
|
||||
contact_phone=contact_phone,
|
||||
@@ -2078,6 +2090,7 @@ def virtualevent_create_view(request):
|
||||
evaluation_closure = cd['evaluation_closure']
|
||||
contact_phone = cd['contact_phone']
|
||||
contact_email = cd['contact_email']
|
||||
coursestandards = cd['coursestandards']
|
||||
|
||||
# correct times
|
||||
|
||||
@@ -2129,6 +2142,7 @@ def virtualevent_create_view(request):
|
||||
evaluation_closure=evaluation_closure,
|
||||
registration_closure=registration_closure,
|
||||
contact_phone=contact_phone,
|
||||
coursestandards=coursestandards,
|
||||
contact_email=contact_email,
|
||||
country = course.country,
|
||||
manager=request.user,
|
||||
|
||||
Reference in New Issue
Block a user