X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/94b69cb76f0bdc6fe119a9acc84f73d3afc82cf2..HEAD:/src/newsletter/forms.py diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index ff7005a79..4f4ced3ae 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -1,5 +1,5 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from django.core.exceptions import ValidationError from django.core.validators import validate_email @@ -14,19 +14,29 @@ from .models import Newsletter class NewsletterForm(Form): email_field = 'email' agree_newsletter = BooleanField( - required=False, initial=False, label=_('I want to receive Wolne Lektury\'s newsletter.')) + required=False, initial=False, label=_('Chcę otrzymywać newsletter Wolnych Lektur'), label_suffix=False) mailing = False mailing_field = 'agree_newsletter' newsletter = None - data_processing_part1 = '''\ -Administratorem danych osobowych jest Fundacja Nowoczesna Polska (ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa). -Podanie danych osobowych jest dobrowolne.''' - data_processing_part2 = '''Dane są przetwarzane w zakresie niezbędnym do wysyłania newslettera odbiorcom.''' - data_processing_part3 = '''\ + data_processing_part1 = _('''\ +Administratorem danych osobowych jest Fundacja Wolne Lektury (ul. Marszałkowska 84/92 lok. 125, 00-514 Warszawa). +Podanie danych osobowych jest dobrowolne.''') + data_processing_part2 = _('''Dane są przetwarzane w zakresie niezbędnym do wysyłania newslettera odbiorcom.''') + data_processing_part3 = _('''\ Osobom, których dane są zbierane, przysługuje prawo dostępu do treści swoich danych oraz ich poprawiania. -Więcej informacji w polityce prywatności.''' +Więcej informacji w polityce prywatności.''') % { + 'url': 'https://fundacja.wolnelektury.pl/prywatnosc/' + } + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Move the newsletter field to the end. + if 'agree_newsletter' in self.fields: + f = self.fields['agree_newsletter'] + del self.fields['agree_newsletter'] + self.fields['agree_newsletter'] = f + @property def data_processing(self): return mark_safe('%s %s %s' % (self.data_processing_part1, self.data_processing_part2, self.data_processing_part3)) @@ -52,7 +62,7 @@ class SubscribeForm(NewsletterForm): agree_newsletter = None required_css_class = 'required' - email = EmailField(label=_('email address')) + email = EmailField(label=_('adres e-mail')) def __init__(self, newsletter, *args, **kwargs): self.newsletter = newsletter