From: Aleksander Łukasz Date: Mon, 7 Apr 2014 14:32:21 +0000 (+0200) Subject: Changes to CopyCamp registration form X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/4983c08a5d6cd30fa94d2b8b0eae96502d05a145 Changes to CopyCamp registration form - two separate forms for participants and speakers - removing introduction chunk above the form --- diff --git a/prawokultury/contact_forms.py b/prawokultury/contact_forms.py index 53d23d2..a53501c 100644 --- a/prawokultury/contact_forms.py +++ b/prawokultury/contact_forms.py @@ -19,12 +19,6 @@ class RegistrationForm(ContactForm): contact = forms.EmailField(label=_('E-mail'), max_length=128) organization = forms.CharField(label=_('Organization'), max_length=256, required=False) - title = forms.CharField(label=_('Title of presentation'), - max_length=256, required=False) - presentation = forms.FileField(label=_('Presentation'), - required=False) - summary = forms.CharField(label=_('Summary of presentation (max. 1800 characters)'), - widget=forms.Textarea, max_length=1800, required=False) agree_data = forms.BooleanField( label=_('Permission for data processing'), 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.') @@ -36,17 +30,65 @@ class RegistrationForm(ContactForm): def __init__(self, *args, **kwargs): super(RegistrationForm, self).__init__(*args, **kwargs) - self.started = getattr(settings, 'REGISTRATION_STARTED', False) - self.open_call = getattr(settings, 'REGISTRATION_OPEN_CALL', False) self.limit_reached = Contact.objects.filter(form_tag=self.save_as_tag).count() >= settings.REGISTRATION_LIMIT - if self.limit_reached: - for field in ('title', 'summary'): - self.fields[field].required = True - if not self.open_call: - for field in ('title', 'summary', 'presentation'): - del self.fields[field] - + + +tracks = ( + 'CopyArt', + 'Creative middle class', + 'How to Pay?', + 'How to Be Paid?', + 'Copyright and Education', + 'Technology and Innovation', + 'Copyright and Human Rights', + 'Self-Publishing', + 'Future of the Book', + 'Copyright Enforcement', + 'Future of Copyright', + 'Copyright Debate', +) + +class RegisterSpeaker(RegistrationForm): + form_tag = 'register-speaker' + save_as_tag = '2014-speaker' + + thematic_track = forms.ChoiceField( + label = _('Please select one thematic track'), + choices=[(t,t) for t in tracks], widget=forms.RadioSelect()) + + bio = forms.CharField(label=_('Short biographical note (max. 500 characters)'), + widget=forms.Textarea, max_length=500, required=True) + + title = forms.CharField(label=_('Title of presentation'), + max_length=256, required=True) + presentation = forms.FileField(label=_('Presentation'), + required=True) + summary = forms.CharField(label=_('Summary of presentation (max. 1800 characters)'), + widget=forms.Textarea, max_length=1800, required=True) + + post_conference_publication = forms.BooleanField( + label=_('I am interested in including my paper in the post-conference publication'), + required=False + ) + + def __init__(self, *args, **kw): + super(RegisterSpeaker, self).__init__(*args, **kw) + self.closed = getattr(settings, 'REGISTRATION_SPEAKER_CLOSED', False) + self.fields.keyOrder = [ + 'name', + 'contact', + 'organization', + 'thematic_track', + 'bio', + 'title', + 'presentation', + 'summary', + 'post_conference_publication', + 'agree_data', + 'agree_license' + ] + class NextForm(ContactForm): form_tag = 'next' diff --git a/prawokultury/locale/pl/LC_MESSAGES/django.mo b/prawokultury/locale/pl/LC_MESSAGES/django.mo index f5344dc..694a971 100644 Binary files a/prawokultury/locale/pl/LC_MESSAGES/django.mo and b/prawokultury/locale/pl/LC_MESSAGES/django.mo differ diff --git a/prawokultury/locale/pl/LC_MESSAGES/django.po b/prawokultury/locale/pl/LC_MESSAGES/django.po index 2f92a5b..0a403b7 100644 --- a/prawokultury/locale/pl/LC_MESSAGES/django.po +++ b/prawokultury/locale/pl/LC_MESSAGES/django.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: prawokultury\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-04-02 16:10+0200\n" +"POT-Creation-Date: 2014-04-07 15:50+0200\n" "PO-Revision-Date: 2014-04-02 16:11+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: FNP \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -18,39 +19,27 @@ msgstr "" "|| n%100>=20) ? 1 : 2);\n" "X-Generator: Poedit 1.5.4\n" -#: contact_forms.py:16 menu_items.py:22 +#: contact_forms.py:15 msgid "Take part!" msgstr "Weź udział!" -#: contact_forms.py:19 contact_forms.py:49 +#: contact_forms.py:18 contact_forms.py:95 msgid "Name" msgstr "Imię i nazwisko" -#: contact_forms.py:20 contact_forms.py:50 +#: contact_forms.py:19 contact_forms.py:96 msgid "E-mail" msgstr "E-mail" -#: contact_forms.py:21 contact_forms.py:51 +#: contact_forms.py:20 contact_forms.py:97 msgid "Organization" msgstr "Organizacja" #: contact_forms.py:23 -msgid "Title of presentation" -msgstr "Tytuł prezentacji" - -#: contact_forms.py:25 -msgid "Presentation" -msgstr "Prezentacja" - -#: contact_forms.py:27 -msgid "Summary of presentation (max. 1800 characters)" -msgstr "Krótki opis prezentacji (maks. 1800 znaków)" - -#: contact_forms.py:30 msgid "Permission for data processing" msgstr "Zgoda na przetwarzanie danych" -#: contact_forms.py:31 +#: contact_forms.py:24 msgid "" "I hereby grant Modern Poland Foundation (Fundacja Nowoczesna Polska, ul. " "Marszałkowska 84/92, 00-514 Warszawa) permission to process my personal data " @@ -60,11 +49,11 @@ msgstr "" "poczty elektronicznej) przez Fundację Nowoczesna Polska (ul. Marszałkowska " "84/92, 00-514 Warszawa) w związku z rejestracją na konferencję CopyCamp." -#: contact_forms.py:34 +#: contact_forms.py:27 msgid "Permission for publication" msgstr "Zgoda na publikację" -#: contact_forms.py:35 +#: contact_forms.py:28 msgid "" "I agree to having materials recorded during the conference released under " "the terms of CC BY-SA." -#: contact_forms.py:47 +#: contact_forms.py:42 +msgid "Please select one thematic track" +msgstr "Proszę wybrać jedną ścieżkę tematyczną" + +#: contact_forms.py:58 +msgid "Short biographical note (max. 500 characters)" +msgstr "Krótka notka biograficzna (maks. 500 znaków)" + +#: contact_forms.py:61 +msgid "Title of presentation" +msgstr "Tytuł prezentacji" + +#: contact_forms.py:63 +msgid "Presentation" +msgstr "Prezentacja" + +#: contact_forms.py:65 +msgid "Summary of presentation (max. 1800 characters)" +msgstr "Krótki opis prezentacji (maks. 1800 znaków)" + +#: contact_forms.py:69 +msgid "" +"I am interested in including my paper in the post-conference publication" +msgstr "" +"Jestem zainteresowana/y umieszczeniem pisemnej wersji mojego wystąpienia w " +"publikacji pokonferencyjnej" + +#: contact_forms.py:93 msgid "Next CopyCamp" msgstr "Kolejny CopyCamp" diff --git a/prawokultury/menu_items.py b/prawokultury/menu_items.py index bca8da5..dadddcc 100644 --- a/prawokultury/menu_items.py +++ b/prawokultury/menu_items.py @@ -19,7 +19,7 @@ add_entry(slug_pl='co') add_entry(slug_pl='gdzie') add_entry(slug_pl='program') add_entry(slug_pl='media') -ITEMS.append(MenuItem(reverse_lazy('contact_form', args=['register']), _('Take part!'))) +add_entry(slug_pl='wez-udzial') add_entry(slug_pl='materialy') add_entry(slug_pl='poprzednie') add_entry(slug_pl='kontakt') diff --git a/prawokultury/static/css/forms.css b/prawokultury/static/css/forms.css index 6cd9a5c..bbd8360 100644 --- a/prawokultury/static/css/forms.css +++ b/prawokultury/static/css/forms.css @@ -38,3 +38,5 @@ font-weight: bold; } .submit-form .required label:before { content: '* '; } + .submit-form input[type="radio"] { + width: auto; } diff --git a/prawokultury/static/css/forms.scss b/prawokultury/static/css/forms.scss index 61b095f..3a6f6d4 100644 --- a/prawokultury/static/css/forms.scss +++ b/prawokultury/static/css/forms.scss @@ -58,4 +58,8 @@ .required label:before { content: '* '; } + + input[type="radio"] { + width: auto; + } } diff --git a/prawokultury/templates/contact/register-speaker/form.html b/prawokultury/templates/contact/register-speaker/form.html new file mode 100644 index 0000000..d35e3c9 --- /dev/null +++ b/prawokultury/templates/contact/register-speaker/form.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} +{% load i18n chunks %} + +{% block "titleextra" %}{{ form.form_title }} :: {% endblock %} + +{% block "body" %} + + +

{% block contact_form_title %}{{ form.form_title }}{% endblock %}

+ + {% if not form.started %} +
+ {% chunk "contact_form__"|add:form.form_tag|add:"__not_started" %} +
+ {% else %} + {% if form.closed %} +
+ {% chunk "contact_form__"|add:form.form_tag|add:"__closed" %} +
+ {% else %} +
+ {% chunk "contact_form__"|add:form.form_tag|add:"__running" %} +
+ +
+ {% csrf_token %} + + {{ form.as_table }} + +
+
+ {% endif %} + {% endif %} + + + +{% endblock %} diff --git a/prawokultury/templates/contact/register-speaker/mail_body.txt b/prawokultury/templates/contact/register-speaker/mail_body.txt new file mode 100644 index 0000000..ba1ee10 --- /dev/null +++ b/prawokultury/templates/contact/register-speaker/mail_body.txt @@ -0,0 +1 @@ +{% extends "contact/register/mail_body.txt" %} \ No newline at end of file diff --git a/prawokultury/templates/contact/register-speaker/mail_subject.txt b/prawokultury/templates/contact/register-speaker/mail_subject.txt new file mode 100644 index 0000000..7ecb3bd --- /dev/null +++ b/prawokultury/templates/contact/register-speaker/mail_subject.txt @@ -0,0 +1 @@ +{% extends "contact/register/mail_subject.txt" %} \ No newline at end of file diff --git a/prawokultury/templates/contact/register-speaker/thanks.html b/prawokultury/templates/contact/register-speaker/thanks.html new file mode 100644 index 0000000..2654563 --- /dev/null +++ b/prawokultury/templates/contact/register-speaker/thanks.html @@ -0,0 +1 @@ +{% extends "contact/register/thanks.html" %} \ No newline at end of file diff --git a/prawokultury/templates/contact/register/form.html b/prawokultury/templates/contact/register/form.html index 516fcfe..bd70ef1 100644 --- a/prawokultury/templates/contact/register/form.html +++ b/prawokultury/templates/contact/register/form.html @@ -6,44 +6,24 @@ {% block "body" %}

{% block contact_form_title %}{{ form.form_title }}{% endblock %}

-
- {% block contact_form_description %} - {% chunk "contact_form__"|add:form.form_tag %} - {% endblock %} -
{% if not form.started %} {# Not yet started. #} -
+
{% chunk "contact_form__"|add:form.form_tag|add:"__not_started" %}
{% else %} {# Already started. #} - {% if form.limit_reached and not form.open_call %} + {% if form.limit_reached %} {# Already closed. #} -
+
{% chunk "contact_form__"|add:form.form_tag|add:"__closed" %}
{% else %} {# Still running. #} - {% if form.limit_reached %} - {# Only taking presentation submissions. #} -
- {% chunk "contact_form__"|add:form.form_tag|add:"__presentations_only" %} -
- {% else %} - {% if not form.open_call %} - {# Not taking presentations any more. #} -
- {% chunk "contact_form__"|add:form.form_tag|add:"__no_presentations" %} -
- {% else %} -
- {% chunk "contact_form__"|add:form.form_tag|add:"__running" %} -
- {% endif %} - {% endif %} - +
+ {% chunk "contact_form__"|add:form.form_tag|add:"__running" %} +
{% csrf_token %}