Fix #541 -- Allow delete waitinglist entries (#544)

Add new action "delete" for each waiting list entries
This commit is contained in:
Daniel
2017-07-09 21:19:30 +08:00
committed by Raphael Michel
parent 275d162b81
commit 0663f25208
5 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Delete entry" %}{% endblock %}
{% block content %}
<h1>{% trans "Delete entry" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<p>{% blocktrans %}Are you sure you want to delete the following waiting list entry <strong>{{ entry }}</strong>?{% endblocktrans %}</p>
<div class="form-group submit-group">
<a href="{% url "control:event.orders.waitinglist" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Delete" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -96,6 +96,7 @@
<th>{% trans "On the list since" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Voucher" %}</th>
<th></th>
</tr>
</thead>
<tbody>
@@ -133,6 +134,13 @@
</button>
{% endif %}
</td>
<td>
{% if not e.voucher %}
<a href="{% url "control:event.orders.waitinglist.delete" organizer=request.event.organizer.slug event=request.event.slug entry=e.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
{% else %}
<span class="btn btn-danger btn-sm disabled"><i class="fa fa-trash"></i></span>
{% endif %}
</td>
<td class="text-right">
</td>
</tr>