X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/798aa75fca4137abc8ab34bca72cb630b7f74222..308fc0f1252dbf98897051a4780679e96eb55f46:/contact/forms.py diff --git a/contact/forms.py b/contact/forms.py index 97fc027..4e99528 100644 --- a/contact/forms.py +++ b/contact/forms.py @@ -38,6 +38,8 @@ class ContactForm(forms.Form): admin_list = None result_page = False mailing_field = None + mailing = False + data_processing = None required_css_class = 'required' contact = NotImplemented @@ -109,7 +111,7 @@ class ContactForm(forms.Form): 'contact/mail_body.txt', ], dictionary, context) send_mail(mail_subject, mail_body, 'no-reply@%s' % site.domain, [contact.contact], fail_silently=True) - if self.mailing_field and self.cleaned_data[self.mailing_field]: + if self.mailing or (self.mailing_field and self.cleaned_data[self.mailing_field]): email = self.cleaned_data['contact'] mailing.subscribe(email)