project/scipycon/talk/forms.py
changeset 94 87e77aa18610
child 96 178b89a3ca4f
equal deleted inserted replaced
93:e86755df35da 94:87e77aa18610
       
     1 # -*- coding: utf-8 -*-
       
     2 from __future__ import absolute_import
       
     3 
       
     4 #django
       
     5 from django import forms
       
     6 
       
     7 #django.contrib
       
     8 from django.contrib.auth.models import User
       
     9 
       
    10 #tagging
       
    11 from tagging.forms import TagField
       
    12 
       
    13 #kiwipycon
       
    14 #from .models import TOPIC_CHOICES
       
    15 from .models import DURATION_CHOICES
       
    16 from .models import AUDIENCE_CHOICES
       
    17 
       
    18 
       
    19 class TalkSubmitForm(forms.Form):
       
    20     """Submit talk form
       
    21     """
       
    22     authors_bio = forms.CharField(widget=forms.Textarea, required=True,
       
    23         label=u'Author(s) and short bio',
       
    24         help_text=u'(include a bit about your qualifications regarding your presentation topic)')
       
    25     contact = forms.EmailField(required=True, label=u'E-Mail ID',
       
    26         help_text=u'Provide your email ID',
       
    27         max_length=1024,
       
    28         widget=forms.TextInput(attrs={'size':'50'}))
       
    29     title = forms.CharField(required=True, label=u'Talk title',
       
    30         help_text=u'Title of proposed presentation',
       
    31         max_length=1024,
       
    32         widget=forms.TextInput(attrs={'size':'50'}))
       
    33     abstract = forms.CharField(widget=forms.Textarea, required=True,
       
    34         help_text=u'Summary of proposed presentation (In 300-700 words)')
       
    35 #    outline = forms.CharField(widget=forms.Textarea, required=True,
       
    36 #        help_text=u'Outline of proposed presentation (around 200 words)')
       
    37 #    topic = forms.ChoiceField(choices=TOPIC_CHOICES,
       
    38 #        label=u'Topic', help_text=u'Select one of the available options or enter other topic')
       
    39 #    topic_other = forms.CharField(label=u'Other topic',
       
    40 #        help_text=u'Description of your topic',
       
    41 #        max_length=255,
       
    42 #        required=False,
       
    43 #        widget=forms.TextInput(attrs={'size':'50'}))
       
    44     topic = forms.CharField(label=u'Topic',
       
    45         help_text=u'Description of your topic or comma separated tags',
       
    46         max_length=255,
       
    47         required=False,
       
    48         widget=forms.TextInput(attrs={'size':'50'}))
       
    49     duration = forms.ChoiceField(choices=DURATION_CHOICES, required=True,
       
    50         label=u'Preferred timeslot', help_text=u'Select preferred time slot')
       
    51     audience = forms.ChoiceField(choices=AUDIENCE_CHOICES, label=u'Intended audience',
       
    52         help_text=u'Select one of the available options or enter other type of intended audience')
       
    53 #    audience_other = forms.CharField(label=u'Other intended audience',
       
    54 #        help_text=u'Description of intended audience (ie. Discordians)',
       
    55 #        max_length=128,
       
    56 #        required=False,
       
    57 #        widget=forms.TextInput(attrs={'size':'50'}))
       
    58 #    tags = TagField(max_length=255,
       
    59 #        widget=forms.TextInput(attrs={'size':'50'}))
       
    60 
       
    61 class TalkEditForm(TalkSubmitForm):
       
    62     id = forms.CharField(widget=forms.HiddenInput)