mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Add a simple test mode (#1181)
- [x] Provide data model and configuration toggle - [x] Allow to delete individual test orders - [x] Add tests - [x] Add a prominent warning message to the backend if test mode orders exist (even though test mode is off), as this leads to wrong statistics - [x] Decide if and how to generate invoices for test orders as invoice numbers cannot be repeated or should not have gaps. - [x] Decide if and how we expose test orders through the API, since our difference pull mechanism relies on the fact that orders cannot be deleted. - [x] Decide if and how we want to couple test modes of payment providers? - [ ] pretix.eu: Ignore test orders for billing - [ ] Adjust payment providers: Mollie, bitpay, cash, fakepayment, sepadebit 
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
{% endblock %}
|
||||
{% block page %}
|
||||
<div class="page-header">
|
||||
{% if request.event.settings.organizer_link_back %}
|
||||
{% if request.event.settings.organizer_link_back %}
|
||||
<p>
|
||||
<a href="{% eventurl request.organizer "presale:organizer.index" %}">
|
||||
« {% blocktrans trimmed with name=request.organizer.name %}
|
||||
@@ -64,6 +64,13 @@
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% if request.event.testmode %}
|
||||
<div class="alert alert-warning">
|
||||
<strong>
|
||||
{% trans "This ticket shop is currently in test mode. Please do not perform any real purchases as your order might be deleted without notice." %}
|
||||
</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert {{ message.tags }}">
|
||||
@@ -73,6 +80,13 @@
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% if request.event.testmode %}
|
||||
<div class="alert alert-testmode alert-warning">
|
||||
<strong>
|
||||
{% trans "This ticket shop is currently in test mode. Please do not perform any real purchases as your order might be deleted without notice." %}
|
||||
</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block footer %}
|
||||
{% if request.event.settings.contact_mail %}
|
||||
|
||||
@@ -31,6 +31,20 @@
|
||||
<div id="payment_{{ p.provider.identifier }}"
|
||||
class="panel-collapse collapsed {% if selected == p.provider.identifier %}in{% endif %}">
|
||||
<div class="panel-body form-horizontal">
|
||||
{% if request.event.testmode %}
|
||||
{% if p.provider.test_mode_message %}
|
||||
<div class="alert alert-info">
|
||||
{{ p.provider.test_mode_message }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "This payment provider does not provide support for testmode." %}
|
||||
<strong>
|
||||
{% trans "If you continue, actual money might be transferred." %}
|
||||
</strong>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ p.form }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
{% blocktrans trimmed with code=order.code %}
|
||||
Your order: {{ code }}
|
||||
{% endblocktrans %}
|
||||
{% if order.testmode %}
|
||||
<span class="label label-warning">{% trans "TEST MODE" %}</span>
|
||||
{% endif %}
|
||||
{% include "pretixpresale/event/fragment_order_status.html" with order=order class="pull-right" %}
|
||||
<div class="clearfix"></div>
|
||||
</h2>
|
||||
|
||||
Reference in New Issue
Block a user