better more intuitive course update
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user