Reduced participant fee: added toggle buttons within office views and
All checks were successful
buildbot/tox Build done.

improved html
This commit is contained in:
2020-12-18 11:48:10 +01:00
parent dab2e5cb76
commit cbc3df97c1
5 changed files with 104 additions and 40 deletions

View File

@@ -53,6 +53,11 @@ class ParticipantListView(generic.ListView):
participant = get_object_or_404(Participant, pk=participant_id)
participant.paid = False
participant.save()
elif action == 'toggle_reduced_fee':
participant_id = request.POST.get('id')
participant = get_object_or_404(Participant, pk=participant_id)
participant.apply_reduced_fee = not participant.apply_reduced_fee
participant.save()
else:
messages.error(request, 'unsupported action: {}'.format(action))
return HttpResponseRedirect(reverse('dav_event_office:participant-list'))