From: Radek Czajka 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?ds=sidebyside;hp=de60c4eaab116232ff6d1be0ede6bc18fc1c86d8 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" %}

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

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 CC BY-SA 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 \n" "Language-Team: FNP \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 CC BY-SA license." msgstr "Wyrażam zgodę na publikację materiałów zarejestrowanych na konferencji na licencji CC BY-SA." @@ -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 Creative Commons Attribution-Share Alike free license." msgstr "Jeśli nie oznaczono inaczej, wszystkie teksty są objęte wolną licencją Creative Commons Uznanie autorstwa – Na tych samych warunkach." +#: 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 @@ - + 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 %} +

{% blocktrans %}Conference registration limit has been reached. +We are now accepting speaker submissions only.{% endblocktrans %}

+{% 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 %} +

{% trans "Thank you for submitting the registration form." %}

+{% endblock %}