From 83620d16f185694792b3653785e720e5f3928d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Fri, 1 Dec 2017 21:18:35 +0100 Subject: [PATCH] volunteers: select activities in enrole form --- cfp/forms.py | 5 ++++- cfp/templates/cfp/volunteer_enrole.html | 20 +------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/cfp/forms.py b/cfp/forms.py index 604cbfd..83ec3f7 100644 --- a/cfp/forms.py +++ b/cfp/forms.py @@ -361,7 +361,10 @@ class VolunteerForm(forms.ModelForm): class Meta: model = Volunteer - fields = ['name', 'email', 'phone_number', 'sms_prefered', 'notes'] + fields = ['name', 'email', 'phone_number', 'sms_prefered', 'activities', 'notes'] + widgets = { + 'activities': forms.CheckboxSelectMultiple, + } def get_talk_speaker_form_class(site): diff --git a/cfp/templates/cfp/volunteer_enrole.html b/cfp/templates/cfp/volunteer_enrole.html index 2b45e2c..2be1f15 100644 --- a/cfp/templates/cfp/volunteer_enrole.html +++ b/cfp/templates/cfp/volunteer_enrole.html @@ -11,7 +11,7 @@

{% trans "Become a volunteers!" %}

- {% blocktrans %}We need you! To participate, please enter your name and e-mail.{% endblocktrans %} + {% blocktrans %}We need you! To participate, please enter your name and e-mail and select the activities you are interested in.{% endblocktrans %}
@@ -33,22 +33,4 @@
-{% for activity in activities %} -{% if forloop.first %} -
-
-{% blocktrans %}We are looking for help with the following activities:{% endblocktrans %} -
- -
-{% endif %} -{% endfor %} - {% endblock %}