From: Radek Czajka Date: Wed, 25 Sep 2019 09:28:34 +0000 (+0200) Subject: Form fix X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/52e56603d35dfd848ea835c1e5b307c5f87d427a Form fix --- diff --git a/prawokultury/contact_forms.py b/prawokultury/contact_forms.py index c977a6a..65041f6 100644 --- a/prawokultury/contact_forms.py +++ b/prawokultury/contact_forms.py @@ -40,19 +40,15 @@ class RegistrationForm(ContactForm): u'to publishing my image.')), required=False ) + agree_terms = forms.BooleanField( + label=mark_safe_lazy( + _(u'I accept CopyCamp Terms and Conditions.')) + ) def __init__(self, *args, **kwargs): super(RegistrationForm, self).__init__(*args, **kwargs) self.started = getattr(settings, 'REGISTRATION_STARTED', False) self.limit_reached = Contact.objects.filter(form_tag=self.save_as_tag).count() >= settings.REGISTRATION_LIMIT - try: - url = Entry.objects.get(slug_pl='regulamin').get_absolute_url() - self.fields['agree_toc'] = forms.BooleanField( - required=True, - label=mark_safe(_('I accept Terms and Conditions of CopyCamp') % url) - ) - except Entry.DoesNotExist: - pass def main_fields(self): return [self[name] for name in ( @@ -97,11 +93,6 @@ class RegisterSpeaker(RegistrationForm): agree_data = None - agree_terms = forms.BooleanField( - label=mark_safe_lazy( - _(u'I accept CopyCamp Terms and Conditions.')) - ) - def __init__(self, *args, **kw): super(RegisterSpeaker, self).__init__(*args, **kw) self.started = getattr(settings, 'REGISTRATION_SPEAKER_STARTED', False) @@ -118,10 +109,7 @@ class RegisterSpeaker(RegistrationForm): 'presentation_title', 'presentation_title_en', 'presentation_summary', - # 'presentation_post_conference_publication', - 'agree_mailing', - # 'agree_data', 'agree_license', 'agree_terms', ]