Commits

gmo...@localhost  committed 448a6ae

field modification

  • Participants
  • Parent commits 3f613f7

Comments (0)

Files changed (2)

File emailform/forms.py

     EmailField,
     FloatField,
     Form,
-    ImageField,
+    FileField,
     IntegerField,
     MultipleChoiceField,
     RadioSelect,
     answer = EmailField()
 
 
-class PhotoUpload(BaseAnswerForm):
-    answer = ImageField()
+class FileUpload(BaseAnswerForm):
+    answer = FileField()
 
 
 class BaseOptionAnswer(BaseAnswerForm):
     OPTION_TYPE_CHOICES.RADIO_LIST:        OptionRadio,
     OPTION_TYPE_CHOICES.CHECKBOX_LIST:     OptionCheckbox,
     OPTION_TYPE_CHOICES.EMAIL_FIELD:       EmailAnswer,
-    OPTION_TYPE_CHOICES.PHOTO_UPLOAD:      PhotoUpload,
+    OPTION_TYPE_CHOICES.FILE_UPLOAD:       FileUpload,
     OPTION_TYPE_CHOICES.PHONE_NUMBER:      USPhoneNumberAnswer,
-    OPTION_TYPE_CHOICES.STATE:             USStateAnswer,
+    OPTION_TYPE_CHOICES.US_STATE:           USStateAnswer,
     OPTION_TYPE_CHOICES.ZIPCODE:           USZipCodeAnswer}
 
 

File emailform/models.py

 
 OPTION_TYPE_CHOICES = ChoiceEnum(sorted([('char', 'Text Field'),
                                          ('email', 'Email Field'),
-                                         ('photo', 'Photo Upload'),
-                                         ('location', 'Location Field'),
+                                         ('file', 'File Upload'),
                                          ('integer', 'Integer'),
                                          ('float', 'Float'),
                                          ('bool', 'Boolean'),