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)
23 agree_mailing = forms.BooleanField(
24 label=_('I am interested in receiving information about the Modern Poland Foundation\'s activities by e-mail'),
27 agree_data = forms.BooleanField(
28 label=_('Permission for data processing'),
29 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.')
31 agree_license = forms.BooleanField(
32 label=_('Permission for publication'),
33 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 and to publishing my image.'),
37 def __init__(self, *args, **kwargs):
38 super(RegistrationForm, self).__init__(*args, **kwargs)
39 self.started = getattr(settings, 'REGISTRATION_STARTED', False)
40 self.limit_reached = Contact.objects.filter(form_tag=self.save_as_tag).count() >= settings.REGISTRATION_LIMIT
45 _('Creative Middle Class'),
48 _('Copyright and Education'),
49 _('Technology and Innovation'),
50 _('Copyright and Human Rights'),
52 _('Future of the Book'),
53 _('Copyright Enforcement'),
54 _('Future of Copyright'),
58 class RegisterSpeaker(RegistrationForm):
59 form_tag = 'register-speaker'
60 save_as_tag = '2014-speaker'
62 thematic_track = forms.ChoiceField(
63 label = _('Please select one thematic track'),
64 choices=[(t,t) for t in tracks], widget=forms.RadioSelect())
66 bio = forms.CharField(label=_('Short biographical note (max. 500 characters)'),
67 widget=forms.Textarea, max_length=500, required=True)
69 title = forms.CharField(label=_('Title of presentation'),
70 max_length=256, required=True)
71 presentation = forms.FileField(label=_('Presentation'),
73 summary = forms.CharField(label=_('Summary of presentation (max. 1800 characters)'),
74 widget=forms.Textarea, max_length=1800, required=True)
76 post_conference_publication = forms.BooleanField(
77 label=_('I am interested in including my paper in the post-conference publication'),
81 def __init__(self, *args, **kw):
82 super(RegisterSpeaker, self).__init__(*args, **kw)
83 self.closed = getattr(settings, 'REGISTRATION_SPEAKER_CLOSED', False)
84 self.fields.keyOrder = [
93 'post_conference_publication',
100 class NextForm(ContactForm):
102 form_title = _('Next CopyCamp')
104 name = forms.CharField(label=_('Name'), max_length=128)
105 contact = forms.EmailField(label=_('E-mail'), max_length=128)
106 organization = forms.CharField(label=_('Organization'),
107 max_length=256, required=False)