From e2ce35a85b7489b7669a1573b8417ad400408d17 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 24 May 2019 13:56:28 +0200 Subject: [PATCH] Order details: Do not show empty cancellation section --- .../templates/pretixpresale/event/order.html | 58 ++++++++----------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/src/pretix/presale/templates/pretixpresale/event/order.html b/src/pretix/presale/templates/pretixpresale/event/order.html index c610ff22e4..a59fde2e33 100644 --- a/src/pretix/presale/templates/pretixpresale/event/order.html +++ b/src/pretix/presale/templates/pretixpresale/event/order.html @@ -222,7 +222,7 @@ {% endif %}
- {% if order.cancel_allowed %} + {% if order.cancel_allowed and order.user_cancel_allowed %}

@@ -230,48 +230,40 @@

- {% if order.user_cancel_allowed %} - {% if order.status == "p" and order.total != 0 %} - {% if order.user_cancel_fee %} -

- {% blocktrans trimmed with fee=order.user_cancel_fee|money:request.event.currency %} - You can cancel this order. In this case, a cancellation fee of {{ fee }} - will be kept and you will receive a refund of the remainder to your original payment method. - {% endblocktrans %} - {% trans "This will invalidate all of your tickets." %} -

- {% else %} -

- {% blocktrans trimmed %} - You can cancel this order and receive a full refund to your original payment method. - {% endblocktrans %} - {% trans "This will invalidate all of your tickets." %} -

- {% endif %} - - - {% trans "Cancel order" %} - - {% else %} + {% if order.status == "p" and order.total != 0 %} + {% if order.user_cancel_fee %}

- {% blocktrans trimmed %} - You can cancel this order using the following button. + {% blocktrans trimmed with fee=order.user_cancel_fee|money:request.event.currency %} + You can cancel this order. In this case, a cancellation fee of {{ fee }} + will be kept and you will receive a refund of the remainder to your original payment method. + {% endblocktrans %} + {% trans "This will invalidate all of your tickets." %} +

+ {% else %} +

+ {% blocktrans trimmed %} + You can cancel this order and receive a full refund to your original payment method. {% endblocktrans %} {% trans "This will invalidate all of your tickets." %}

- - - {% trans "Cancel order" %} - {% endif %} + + + {% trans "Cancel order" %} + {% else %}

{% blocktrans trimmed %} - You can not cancel this order yourself. Please contact the event organizer for more information. + You can cancel this order using the following button. {% endblocktrans %} + {% trans "This will invalidate all of your tickets." %}

+ + + {% trans "Cancel order" %} + {% endif %}