X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/08e687e53ba84afd39646185142e59c6bfe77783..8f031335a8a0dabceec381b89eb0cbbcb2f4b637:/src/newsletter/forms.py?ds=sidebyside
diff --git a/src/newsletter/forms.py b/src/newsletter/forms.py
index 47606a57f..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
@@ -25,8 +25,16 @@ 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.'''
+ 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))
@@ -50,6 +58,7 @@ WiÄcej informacji w polityce prywatnoÅci.'''
class SubscribeForm(NewsletterForm):
mailing = True
agree_newsletter = None
+ required_css_class = 'required'
email = EmailField(label=_('email address'))