Private
Public Access
1
0

better more intuitive course update

This commit is contained in:
Sander Roosendaal
2020-07-11 17:05:21 +02:00
parent 7b552f8da6
commit 6372da689c
10 changed files with 570 additions and 54 deletions

View File

@@ -203,7 +203,7 @@ class ImageForm(forms.Form):
# The form used for uploading images
class CourseForm(forms.Form):
name = forms.CharField(max_length=150,label='Course Name')
name = forms.CharField(max_length=150,label='Course Name',required=False)
file = forms.FileField(required=False,
validators=[validate_kml])
notes = forms.CharField(required=False,
@@ -214,6 +214,13 @@ class CourseForm(forms.Form):
from django.forms.widgets import HiddenInput
super(CourseForm, self).__init__(*args, **kwargs)
class CourseConfirmForm(forms.Form):
BOOL_CHOICES = ((True, 'Yes'), (False, 'No'))
doupdate = forms.TypedChoiceField(
initial=False,
coerce=lambda x: x =='True', choices=((False, 'No'), (True, 'Yes')), widget=forms.RadioSelect,
label='Update Course with new markers?')
# The form used for uploading files
class StandardsForm(forms.Form):
name = forms.CharField(max_length=150,label='Course Name')