From: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl> Date: Thu, 8 Nov 2012 10:23:28 +0000 (+0100) Subject: registration limit X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/cc96a54d3bfe917023233a5f45ead32e10f2e66c registration limit --- diff --git a/contact/templates/contact/form.html b/contact/templates/contact/form.html index d910424..29fdfa8 100644 --- a/contact/templates/contact/form.html +++ b/contact/templates/contact/form.html @@ -1,5 +1,8 @@ {% extends "base.html" %} {% load i18n chunks %} + +{% block "titleextra" %}{{ form.form_title }} :: {% endblock %} + {% block "body" %} <h1>{% block contact_form_title %}{{ form.form_title }}{% endblock %}</h1> diff --git a/prawokultury/contact_forms.py b/prawokultury/contact_forms.py index 2021be7..b3019cf 100644 --- a/prawokultury/contact_forms.py +++ b/prawokultury/contact_forms.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- +from django.conf import settings from django import forms from contact.forms import ContactForm +from contact.models import Contact from django.utils.translation import ugettext_lazy as _ @@ -26,3 +28,10 @@ class RegistrationForm(ContactForm): label=_('Permission for publication'), 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.') ) + + def __init__(self, *args, **kwargs): + super(RegistrationForm, self).__init__(*args, **kwargs) + self.limit_reached = Contact.objects.all().count() >= settings.REGISTRATION_LIMIT + if self.limit_reached: + for field in ('title', 'summary'): + self.fields[field].required = True diff --git a/prawokultury/locale/pl/LC_MESSAGES/django.mo b/prawokultury/locale/pl/LC_MESSAGES/django.mo index 32dd74c..b64ebaa 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 635a88d..4f784a8 100644 --- a/prawokultury/locale/pl/LC_MESSAGES/django.po +++ b/prawokultury/locale/pl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: prawokultury\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-07 09:55+0100\n" -"PO-Revision-Date: 2012-11-07 09:57+0100\n" +"POT-Creation-Date: 2012-11-08 11:21+0100\n" +"PO-Revision-Date: 2012-11-08 11:22+0100\n" "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n" "Language-Team: FNP <fundacja@nowoczesnapolska.org.pl>\n" "Language: \n" @@ -17,48 +17,48 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#: contact_forms.py:9 +#: contact_forms.py:11 #: menu_items.py:22 msgid "Take part!" msgstr "Weź udziaÅ!" -#: contact_forms.py:11 +#: contact_forms.py:13 msgid "Name" msgstr "ImiÄ i nazwisko" -#: contact_forms.py:12 +#: contact_forms.py:14 msgid "E-mail" msgstr "E-mail" -#: contact_forms.py:13 +#: contact_forms.py:15 msgid "Organization" msgstr "Organizacja" -#: contact_forms.py:15 +#: contact_forms.py:17 msgid "Title of presentation" msgstr "TytuÅ prezentacji" -#: contact_forms.py:17 +#: contact_forms.py:19 msgid "Presentation" msgstr "Prezentacja" -#: contact_forms.py:19 +#: contact_forms.py:21 msgid "Summary of presentation (max. 1800 characters)" msgstr "Krótki opis prezentacji (maks. 1800 znaków)" -#: contact_forms.py:22 +#: contact_forms.py:24 msgid "Permission for data processing" msgstr "Zgoda na przetwarzanie danych" -#: contact_forms.py:23 +#: contact_forms.py:25 msgid "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." msgstr "Wyrażam zgodÄ na przetwarzanie moich danych osobowych (imiÄ, nazwisko, adres 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:26 +#: contact_forms.py:28 msgid "Permission for publication" msgstr "Zgoda na publikacjÄ" -#: contact_forms.py:27 +#: contact_forms.py:29 msgid "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." msgstr "Wyrażam zgodÄ na publikacjÄ materiaÅów zarejestrowanych na konferencji na licencji <a href=\"http://creativecommons.org/licenses/by-sa/3.0/deed.pl\">CC BY-SA</a>." @@ -71,6 +71,10 @@ msgstr "Strona nie znaleziona" msgid "The page you were looking for doesn't exist." msgstr "Strona, której szukasz, nie istnieje." +#: templates/base.html:16 +msgid "CopyCamp Conference is the first large-scale meeting in Poland devoted to the issues of copyright in both ideological and practical terms." +msgstr "CopyCamp jest pierwszym w Polsce, organizowanym na duÅ¼Ä skalÄ spotkaniem osób zajmujÄ cych siÄ problematykÄ praw autorskich." + #: templates/base.html:26 msgid "CopyCamp" msgstr "CopyCamp" @@ -83,6 +87,32 @@ msgstr "Szukaj" msgid "If not explicitly stated otherwise, all texts are licensed under the <a href='http://creativecommons.org/licenses/by-sa/3.0/'>Creative Commons Attribution-Share Alike</a> free license." msgstr "JeÅli nie oznaczono inaczej, wszystkie teksty sÄ objÄte wolnÄ licencjÄ <a href='http://creativecommons.org/licenses/by-sa/3.0/deed.pl'>Creative Commons Uznanie autorstwa â Na tych samych warunkach</a>." +#: templates/contact/register/form.html:8 +msgid "" +"Conference registration limit has been reached.\n" +"We are now accepting speaker submissions only." +msgstr "" +"Limit rejestracji uczestników konferencji zostaÅ osiÄ gniÄty.\n" +"Obecnie przyjmujemy tylko zgÅoszenia prezentacji." + +#: templates/contact/register/mail_body.txt:2 +#: templates/contact/register/mail_subject.txt:1 +#, python-format +msgid "Thank you for submitting the registration form at %(site_name)s." +msgstr "DziÄkujemy za wypeÅnienie formularza rejestracyjnego na stronie %(site_name)s." + +#: templates/contact/register/mail_body.txt:3 +msgid "Your submission has been referred to the project coordinator." +msgstr "Twoje zgÅoszenie zostaÅo przekazane osobie koordynujÄ cej projekt." + +#: templates/contact/register/mail_body.txt:6 +msgid "Message sent automatically. Please do not reply to it." +msgstr "WiadomoÅÄ wysÅana automatycznie, prosimy nie odpowiadaÄ." + +#: templates/contact/register/thanks.html:5 +msgid "Thank you for submitting the registration form." +msgstr "DziÄkujemy za wypeÅnienie formularza rejestracyjnego." + #~ msgid "Registration form" #~ msgstr "Formularz rejestracyjny" diff --git a/prawokultury/settings.d/60-custom.conf b/prawokultury/settings.d/60-custom.conf index bf41dc9..87e1d91 100755 --- a/prawokultury/settings.d/60-custom.conf +++ b/prawokultury/settings.d/60-custom.conf @@ -16,3 +16,4 @@ MENU_MODULE = 'prawokultury.menu_items' # See http://wiki.nginx.org/X-accel X_ACCEL_REDIRECT = False +REGISTRATION_LIMIT = 100 diff --git a/prawokultury/static/css/base.css b/prawokultury/static/css/base.css index 9c3ddd8..cc08544 100644 --- a/prawokultury/static/css/base.css +++ b/prawokultury/static/css/base.css @@ -27,8 +27,7 @@ h1 { .warning { border: 1px solid #ddd; padding: 1em; - background: #ffd; - font-size: 1.3em; } + background: #ffd; } .notice { font-size: 1.3em; } diff --git a/prawokultury/static/css/base.scss b/prawokultury/static/css/base.scss index 18db75e..adcb27c 100644 --- a/prawokultury/static/css/base.scss +++ b/prawokultury/static/css/base.scss @@ -35,7 +35,6 @@ h1 { border: 1px solid #ddd; padding: 1em; background: #ffd; - font-size: 1.3em; } .notice { diff --git a/prawokultury/templates/base.html b/prawokultury/templates/base.html index b484c46..8debfde 100755 --- a/prawokultury/templates/base.html +++ b/prawokultury/templates/base.html @@ -13,7 +13,7 @@ <meta property='og:url' content='{% block "ogurl" %}{% url 'migdal_main' %}{% endblock %}' /> <meta property='og:title' content='{% block "ogtitle" %}CopyCamp{% endblock %}' /> <meta property='og:site_name' content='CopyCamp' /> - <meta property='og:description' content='{% block "ogdescription" %}CopyCamp!{% endblock %}' /> + <meta property='og:description' content='{% block "ogdescription" %}{% trans "CopyCamp Conference is the first large-scale meeting in Poland devoted to the issues of copyright in both ideological and practical terms." %}{% endblock %}' /> <meta property='og:type' content='{% block "ogtype" %}website{% endblock %}' /> <meta property='og:image' content='{% block "ogimage" %}{{ "img/copycamp2012_"|add:request.LANGUAGE_CODE|add:".png"|build_absolute_uri:request }}{% endblock %}' /> <meta property='og:locale' content='pl_PL' /> diff --git a/prawokultury/templates/contact/register/form.html b/prawokultury/templates/contact/register/form.html new file mode 100755 index 0000000..75d99a9 --- /dev/null +++ b/prawokultury/templates/contact/register/form.html @@ -0,0 +1,12 @@ +{% extends "contact/form.html" %} +{% load i18n %} + +{% block contact_form_description %} +{{ block.super }} + +{% if form.limit_reached %} +<p class="warning">{% blocktrans %}Conference registration limit has been reached. +We are now accepting speaker submissions only.{% endblocktrans %}</p> +{% endif %} + +{% endblock %} diff --git a/prawokultury/templates/contact/register/mail_body.txt b/prawokultury/templates/contact/register/mail_body.txt new file mode 100755 index 0000000..4c30ef7 --- /dev/null +++ b/prawokultury/templates/contact/register/mail_body.txt @@ -0,0 +1,6 @@ +{% load i18n %} +{% blocktrans %}Thank you for submitting the registration form at {{ site_name }}.{% endblocktrans %} +{% trans "Your submission has been referred to the project coordinator." %} + +-- +{% trans "Message sent automatically. Please do not reply to it." %} diff --git a/prawokultury/templates/contact/register/mail_subject.txt b/prawokultury/templates/contact/register/mail_subject.txt new file mode 100755 index 0000000..63a44bf --- /dev/null +++ b/prawokultury/templates/contact/register/mail_subject.txt @@ -0,0 +1 @@ +{% load i18n %}{% blocktrans %}Thank you for submitting the registration form at {{ site_name }}.{% endblocktrans %} \ No newline at end of file diff --git a/prawokultury/templates/contact/register/thanks.html b/prawokultury/templates/contact/register/thanks.html new file mode 100755 index 0000000..3a21c98 --- /dev/null +++ b/prawokultury/templates/contact/register/thanks.html @@ -0,0 +1,6 @@ +{% extends "contact/thanks.html" %} +{% load i18n %} + +{% block contact_form_description %} +<p class="notice">{% trans "Thank you for submitting the registration form." %}</p> +{% endblock %}