volunteers: select activities in enrole form
This commit is contained in:
parent
e56e10f8b8
commit
83620d16f1
|
@ -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):
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<h1>
|
||||
{% trans "Become a volunteers!" %}
|
||||
</h1>
|
||||
{% 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 %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@ -33,22 +33,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% for activity in activities %}
|
||||
{% if forloop.first %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{% blocktrans %}We are looking for help with the following activities:{% endblocktrans %}
|
||||
</div>
|
||||
<ul class="list-group">
|
||||
{% endif %}
|
||||
<li class="list-group-item">
|
||||
<b>{{ activity.name }}</b>
|
||||
{{ activity.description }}
|
||||
</li>
|
||||
{% if forloop.last %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue