1 # -*- coding: utf-8 -*-
2 from django.conf import settings
3 from django import forms
4 from contact.forms import ContactForm
5 from contact.models import Contact
6 from django.utils.translation import ugettext_lazy as _
9 class RegistrationForm(ContactForm):
13 conference_name = u'CopyCamp 2014'
15 form_title = _('Take part!')
16 admin_list = ['name', 'organization', 'title']
18 name = forms.CharField(label=_('Name'), max_length=128)
19 contact = forms.EmailField(label=_('E-mail'), max_length=128)
20 organization = forms.CharField(label=_('Organization'),
21 max_length=256, required=False)
22 agree_data = forms.BooleanField(
23 label=_('Permission for data processing'),
24 help_text=_(u'I hereby grant Modern Poland Foundation (Fundacja Nowoczesna Polska, ul. MarszaĆkowska 84/92, 00-514 Warszawa) permission to process my personal data (name, e-mail address) for purposes of registration for CopyCamp conference.')
26 agree_license = forms.BooleanField(
27 label=_('Permission for publication'),
28 help_text=_('I agree to having materials recorded during the conference released under the terms of <a href="http://creativecommons.org/licenses/by-sa/3.0/deed">CC BY-SA</a> license.')
31 def __init__(self, *args, **kwargs):
32 super(RegistrationForm, self).__init__(*args, **kwargs)
33 self.started = getattr(settings, 'REGISTRATION_STARTED', False)
34 self.limit_reached = Contact.objects.filter(form_tag=self.save_as_tag).count() >= settings.REGISTRATION_LIMIT
39 'Creative middle class',
42 'Copyright and Education',
43 'Technology and Innovation',
44 'Copyright and Human Rights',
47 'Copyright Enforcement',
48 'Future of Copyright',
52 class RegisterSpeaker(RegistrationForm):
53 form_tag = 'register-speaker'
54 save_as_tag = '2014-speaker'
56 thematic_track = forms.ChoiceField(
57 label = _('Please select one thematic track'),
58 choices=[(t,t) for t in tracks], widget=forms.RadioSelect())
60 bio = forms.CharField(label=_('Short biographical note (max. 500 characters)'),
61 widget=forms.Textarea, max_length=500, required=True)
63 title = forms.CharField(label=_('Title of presentation'),
64 max_length=256, required=True)
65 presentation = forms.FileField(label=_('Presentation'),
67 summary = forms.CharField(label=_('Summary of presentation (max. 1800 characters)'),
68 widget=forms.Textarea, max_length=1800, required=True)
70 post_conference_publication = forms.BooleanField(
71 label=_('I am interested in including my paper in the post-conference publication'),
75 def __init__(self, *args, **kw):
76 super(RegisterSpeaker, self).__init__(*args, **kw)
77 self.closed = getattr(settings, 'REGISTRATION_SPEAKER_CLOSED', False)
78 self.fields.keyOrder = [
87 'post_conference_publication',
93 class NextForm(ContactForm):
95 form_title = _('Next CopyCamp')
97 name = forms.CharField(label=_('Name'), max_length=128)
98 contact = forms.EmailField(label=_('E-mail'), max_length=128)
99 organization = forms.CharField(label=_('Organization'),
100 max_length=256, required=False)