diff --git a/pretix_public_registrations/locale/de/LC_MESSAGES/django.po b/pretix_public_registrations/locale/de/LC_MESSAGES/django.po index 6f64fbae13a3357d8a9d251fafe8692e86501074..f0a52871c6a7f3053ca8bae3b768d06b0a99fb5b 100644 --- a/pretix_public_registrations/locale/de/LC_MESSAGES/django.po +++ b/pretix_public_registrations/locale/de/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-07 19:01+0100\n" +"POT-Creation-Date: 2019-06-13 23:47+0200\n" "PO-Revision-Date: \n" "Last-Translator: Felix Schäfer\n" "Language-Team: \n" @@ -10,3 +10,10 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.3\n" +"X-Poedit-Basepath: ../../..\n" +"X-Poedit-SearchPath-0: .\n" + +#: signals.py:11 +msgid "Public registration" +msgstr "Öffentliche Anmeldung" diff --git a/pretix_public_registrations/locale/de_Informal/LC_MESSAGES/django.po b/pretix_public_registrations/locale/de_Informal/LC_MESSAGES/django.po index 6f64fbae13a3357d8a9d251fafe8692e86501074..3aed04c1f4914cf862ea25dff2aa262d6184e011 100644 --- a/pretix_public_registrations/locale/de_Informal/LC_MESSAGES/django.po +++ b/pretix_public_registrations/locale/de_Informal/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-03-07 19:01+0100\n" +"POT-Creation-Date: 2019-06-13 23:49+0200\n" "PO-Revision-Date: \n" "Last-Translator: Felix Schäfer\n" "Language-Team: \n" @@ -10,3 +10,10 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.3\n" +"X-Poedit-Basepath: ../../..\n" +"X-Poedit-SearchPath-0: .\n" + +#: signals.py:11 +msgid "Public registration" +msgstr "Öffentliche Anmeldung" diff --git a/pretix_public_registrations/signals.py b/pretix_public_registrations/signals.py index a025794b086c8b99cc5541a2698f6d4a86ad5cd5..1f9aff0912c9d5b628f5e8108b90adc8a2672bd1 100644 --- a/pretix_public_registrations/signals.py +++ b/pretix_public_registrations/signals.py @@ -1 +1,15 @@ -# Register your receivers here +from django import forms +from django.dispatch import receiver +from django.utils.translation import ugettext_lazy as _ +from i18nfield.strings import LazyI18nString +from pretix.presale.signals import question_form_fields + + +@receiver(question_form_fields, dispatch_uid="pretix_public_registration_question") +def add_public_registration_question(sender, **kwargs): + return {'public_registration': forms.CharField( + label=_('Public registration'), + required=False, + help_text=sender.settings.get('public_registration_field_help_text', as_type=LazyI18nString), + widget=forms.CheckboxInput(), + )}