+
+ save_as_tag = '2019'
+ conference_name = u'CopyCamp 2019'
+ notify_on_register = False
+
+ form_title = _('Registration')
+ admin_list = ['first_name', 'last_name', 'organization']
+
+ first_name = forms.CharField(label=_('First name'), max_length=128)
+ last_name = forms.CharField(label=_('Last name'), max_length=128)
+ contact = forms.EmailField(label=_('E-mail'), max_length=128)
+ organization = forms.CharField(label=_('Organization'), max_length=256, required=False)
+ agree_license = forms.BooleanField(
+ label=_('Permission for publication'),
+ help_text=mark_safe_lazy(_(
+ u'I agree to having materials, recorded during the conference, released under the terms of '
+ u'<a href="http://creativecommons.org/licenses/by-sa/3.0/deed">CC\u00a0BY-SA</a> license and '
+ u'to publishing my image.')),
+ required=False
+ )
+ agree_terms = forms.BooleanField(
+ label=mark_safe_lazy(
+ _(u'I accept <a href="/en/info/terms-and-conditions/">CopyCamp Terms and Conditions</a>.'))
+ )
+
+ def __init__(self, *args, **kwargs):
+ super(RegistrationForm, self).__init__(*args, **kwargs)
+ self.started = getattr(settings, 'REGISTRATION_STARTED', False)
+ self.limit_reached = Contact.objects.filter(form_tag=self.save_as_tag).count() >= settings.REGISTRATION_LIMIT
+
+ def main_fields(self):
+ return [self[name] for name in (
+ 'first_name', 'last_name', 'contact', 'organization')]
+
+ def survey_fields(self):
+ return []
+
+ def agreement_fields(self):
+ return [self[name] for name in ('agree_license', 'agree_toc')]
+
+
+class RegisterSpeaker(RegistrationForm):
+ form_tag = 'register-speaker'
+ save_as_tag = '2019-speaker'
+ form_title = _('Open call for presentations')
+ notify_on_register = False
+
+ bio = forms.CharField(label=mark_safe_lazy(
+ _('Short biographical note in Polish (max. 500 characters)')),
+ widget=forms.Textarea, max_length=500, required=True)
+ bio_en = forms.CharField(label=_('Short biographical note in English (max. 500 characters, not required)'), widget=forms.Textarea,
+ max_length=500, required=False)
+ photo = forms.FileField(label=_('Photo'), required=False)
+ phone = forms.CharField(label=_('Phone number'), max_length=64,
+ required=False,
+ help_text=_('(used only for organizational purposes)'))
+
+ presentation_title = forms.CharField(
+ label=mark_safe_lazy(_('Presentation title in Polish')),
+ max_length=256)
+ presentation_title_en = forms.CharField(
+ label=_('Presentation title in English (not required)'), max_length=256, required=False)
+ presentation_summary = forms.CharField(label=_('Presentation summary (max. 1800 characters)'),
+ widget=forms.Textarea, max_length=1800)
+
+ # presentation_post_conference_publication = forms.BooleanField(
+ # label=_('I am interested in including my paper in the post-conference publication'),
+ # required=False
+ # )
+
+ agree_data = None
+
+ def __init__(self, *args, **kw):
+ super(RegisterSpeaker, self).__init__(*args, **kw)
+ self.started = getattr(settings, 'REGISTRATION_SPEAKER_STARTED', False)
+ self.closed = getattr(settings, 'REGISTRATION_SPEAKER_CLOSED', False)
+ self.fields.keyOrder = [
+ 'first_name',
+ 'last_name',
+ 'contact',
+ 'phone',
+ 'organization',
+ 'bio',
+ 'bio_en',
+ 'photo',
+ 'presentation_title',
+ 'presentation_title_en',
+ 'presentation_summary',
+
+ 'agree_license',
+ 'agree_terms',
+ ]
+
+
+class RemindForm(ContactForm):
+ form_tag = 'remind-me'
+ save_as_tag = 'remind-me-2019'
+ form_title = u'CopyCamp 2019'
+ notify_on_register = False
+ notify_user = False
+
+
+class NextForm(ContactForm):
+ form_tag = '/next'
+ form_title = _('Next CopyCamp')