diff --git a/src/kasu/templates/form.html b/src/kasu/templates/form.html index 8175adc..b3a070d 100644 --- a/src/kasu/templates/form.html +++ b/src/kasu/templates/form.html @@ -5,8 +5,8 @@ {{ field }} - {% if field.help_text and not field.field.widget.input_type %} - {{field.help_text}} + {% if field.field.widget.input_type == 'checkbox' %} + {% elif field.help_text %}
{{field.help_text}}
{% endif %} diff --git a/src/membership/forms.py b/src/membership/forms.py index c685344..e996b3e 100644 --- a/src/membership/forms.py +++ b/src/membership/forms.py @@ -10,9 +10,10 @@ from django.conf import settings from django.contrib import auth from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ - +from django.utils.safestring import mark_safe from utils.massmailer import MassMailer from . import models +from content.models import Page class MembershipForm(forms.ModelForm): @@ -68,6 +69,18 @@ class RegistrationForm(MembershipForm): widget=forms.PasswordInput(), label=_('password')) password2 = forms.CharField( widget=forms.PasswordInput(), label=_('password (again)')) + privacy_policy = forms.BooleanField( + label=_('Privacy policy'), + help_text=_( + 'I have read and understood the privacy policy') % + Page.objects.get(slug='privacypolicy').get_absolute_url()) + membership = forms.BooleanField( + label=_('Membership'), + help_text=_( + 'Yes, I confirm that I am in agreement with the ' + 'statutes and would like to become a member.') % + Page.objects.get(slug='statutes').get_absolute_url()) + recaptcha = ReCaptchaField() class Meta: