X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/94b69cb76f0bdc6fe119a9acc84f73d3afc82cf2..758943d9c9bc7aafb8262ee265018502f2db469d:/src/newsletter/forms.py diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py index ff7005a79..fc1e4e316 100644 --- a/src/newsletter/forms.py +++ b/src/newsletter/forms.py @@ -14,7 +14,7 @@ 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=_('I want to receive Wolne Lektury\'s newsletter.'), label_suffix=False) mailing = False mailing_field = 'agree_newsletter' newsletter = None @@ -27,6 +27,14 @@ Podanie danych osobowych jest dobrowolne.''' 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.''' + 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))