Reduced participant fee: added toggle buttons within office views and
All checks were successful
buildbot/tox Build done.
All checks were successful
buildbot/tox Build done.
improved html
This commit is contained in:
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user