Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #163 -- Form to change orders, not yet functional
- Loading branch information
Showing
7 changed files
with
211 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
src/pretix/control/templates/pretixcontrol/order/change.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
{% extends "pretixcontrol/event/base.html" %} | ||
{% load i18n %} | ||
{% load bootstrap3 %} | ||
{% block title %} | ||
{% blocktrans trimmed with code=order.code %} | ||
Change order: {{ code }} | ||
{% endblocktrans %} | ||
{% endblock %} | ||
{% block content %} | ||
<h1> | ||
{% blocktrans trimmed with code=order.code %} | ||
Change order: {{ code }} | ||
{% endblocktrans %} | ||
</h1> | ||
<p> | ||
{% blocktrans trimmed %} | ||
You can use this tool to change the ordered products or to partially cancel the order. Please keep | ||
in mind that changing an order can have several implications, e.g. the payment method fee might change or | ||
additional questions can be added to the order that need to be answered by the user. | ||
{% endblocktrans %} | ||
</p> | ||
<p> | ||
{% blocktrans trimmed %} | ||
The user will receive a notification about the change but in the case of new required questions, the user | ||
will not be forced to answer them. You cannot use this form to add something to the order, please create | ||
a second order instead. | ||
{% endblocktrans %} | ||
</p> | ||
<p> | ||
{% blocktrans trimmed %} | ||
If an invoice is attached to the order, a cancellation will be created together with a new invoice. | ||
{% endblocktrans %} | ||
</p> | ||
<div class="alert alert-warning"> | ||
{% blocktrans trimmed %} | ||
Please use this tool carefully. Changes you make here are not reversible. In most cases it is easier to | ||
cancel the order completely and create a new one. | ||
{% endblocktrans %} | ||
</div> | ||
<form method="post" class="form-horizontal" href=""> | ||
{% csrf_token %} | ||
{% for position in positions %} | ||
<div class="panel panel-default items"> | ||
<div class="panel-heading"> | ||
<h3 class="panel-title"> | ||
<strong>{{ position.item.name }}</strong> | ||
{% if position.variation %} | ||
– {{ position.variation }} | ||
{% endif %} | ||
</h3> | ||
</div> | ||
<div class="panel-body"> | ||
<div class="form-inline form-order-change"> | ||
{% bootstrap_form_errors position.form %} | ||
<div class="radio"> | ||
<label> | ||
<input name="{{ position.form.prefix }}-operation" type="radio" value="" | ||
{% if not position.form.operation.value %}checked="checked"{% endif %}> | ||
{% trans "Keep unchanged" %} | ||
</label> | ||
</div> | ||
<div class="radio"> | ||
<label> | ||
<input name="{{ position.form.prefix }}-operation" type="radio" value="product" | ||
{% if position.form.operation.value == "product" %}checked="checked"{% endif %}> | ||
{% trans "Change product to" %} | ||
{% bootstrap_field position.form.itemvar layout='inline' %} | ||
</label> | ||
</div> | ||
<div class="radio"> | ||
<label> | ||
<input name="{{ position.form.prefix }}-operation" type="radio" value="price" | ||
{% if position.form.operation.value == "price" %}checked="checked"{% endif %}> | ||
{% trans "Change price to" %} | ||
{% bootstrap_field position.form.price layout='inline' %} | ||
</label> | ||
</div> | ||
<div class="radio"> | ||
<label> | ||
<input name="{{ position.form.prefix }}-operation" type="radio" value="cancel" | ||
{% if position.form.operation.value == "cancel" %}checked="checked"{% endif %}> | ||
{% trans "Remove from order" %} | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<div class="form-group submit-group"> | ||
<a class="btn btn-default btn-lg" | ||
href="{% url "control:event.order" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"> | ||
{% trans "Cancel" %} | ||
</a> | ||
<button class="btn btn-danger btn-save btn-lg" type="submit"> | ||
{% trans "Save" %} | ||
</button> | ||
<div class="clearfix"></div> | ||
</div> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters