forked from CGM_Public/pretix_original
Allow to hide cancellation fee from end-user in approval flow (#2735)
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
This commit is contained in:
@@ -762,6 +762,7 @@ class EventSettingsSerializer(SettingsSerializer):
|
|||||||
'cancel_allow_user_paid_adjust_fees_step',
|
'cancel_allow_user_paid_adjust_fees_step',
|
||||||
'cancel_allow_user_paid_refund_as_giftcard',
|
'cancel_allow_user_paid_refund_as_giftcard',
|
||||||
'cancel_allow_user_paid_require_approval',
|
'cancel_allow_user_paid_require_approval',
|
||||||
|
'cancel_allow_user_paid_require_approval_fee_unknown',
|
||||||
'change_allow_user_variation',
|
'change_allow_user_variation',
|
||||||
'change_allow_user_addons',
|
'change_allow_user_addons',
|
||||||
'change_allow_user_until',
|
'change_allow_user_until',
|
||||||
|
|||||||
@@ -1514,6 +1514,15 @@ DEFAULTS = {
|
|||||||
"before the order is canceled and a refund is issued."),
|
"before the order is canceled and a refund is issued."),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
'cancel_allow_user_paid_require_approval_fee_unknown': {
|
||||||
|
'default': 'False',
|
||||||
|
'type': bool,
|
||||||
|
'form_class': forms.BooleanField,
|
||||||
|
'serializer_class': serializers.BooleanField,
|
||||||
|
'form_kwargs': dict(
|
||||||
|
label=_("Do not show the cancellation fee to users when they request cancellation."),
|
||||||
|
)
|
||||||
|
},
|
||||||
'cancel_allow_user_paid_refund_as_giftcard': {
|
'cancel_allow_user_paid_refund_as_giftcard': {
|
||||||
'default': 'off',
|
'default': 'off',
|
||||||
'type': str,
|
'type': str,
|
||||||
|
|||||||
@@ -674,6 +674,7 @@ class CancelSettingsForm(SettingsForm):
|
|||||||
'cancel_allow_user_paid_adjust_fees_step',
|
'cancel_allow_user_paid_adjust_fees_step',
|
||||||
'cancel_allow_user_paid_refund_as_giftcard',
|
'cancel_allow_user_paid_refund_as_giftcard',
|
||||||
'cancel_allow_user_paid_require_approval',
|
'cancel_allow_user_paid_require_approval',
|
||||||
|
'cancel_allow_user_paid_require_approval_fee_unknown',
|
||||||
'change_allow_user_variation',
|
'change_allow_user_variation',
|
||||||
'change_allow_user_price',
|
'change_allow_user_price',
|
||||||
'change_allow_user_until',
|
'change_allow_user_until',
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
<legend>{% trans "Paid orders" %}</legend>
|
<legend>{% trans "Paid orders" %}</legend>
|
||||||
{% bootstrap_field form.cancel_allow_user_paid layout="control" %}
|
{% bootstrap_field form.cancel_allow_user_paid layout="control" %}
|
||||||
{% bootstrap_field form.cancel_allow_user_paid_require_approval layout="control" %}
|
{% bootstrap_field form.cancel_allow_user_paid_require_approval layout="control" %}
|
||||||
|
<div data-display-dependency="#id_cancel_allow_user_paid_require_approval">
|
||||||
|
{% bootstrap_field form.cancel_allow_user_paid_require_approval_fee_unknown layout="control" %}
|
||||||
|
</div>
|
||||||
{% bootstrap_field form.cancel_allow_user_paid_keep layout="control" %}
|
{% bootstrap_field form.cancel_allow_user_paid_keep layout="control" %}
|
||||||
{% bootstrap_field form.cancel_allow_user_paid_keep_percentage layout="control" %}
|
{% bootstrap_field form.cancel_allow_user_paid_keep_percentage layout="control" %}
|
||||||
{% bootstrap_field form.cancel_allow_user_paid_keep_fees layout="control" %}
|
{% bootstrap_field form.cancel_allow_user_paid_keep_fees layout="control" %}
|
||||||
|
|||||||
@@ -373,7 +373,26 @@
|
|||||||
{% if user_cancel_allowed %}
|
{% if user_cancel_allowed %}
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
{% if order.status == "p" and order.total != 0 %}
|
{% if order.status == "p" and order.total != 0 %}
|
||||||
{% if order.user_cancel_fee >= order.total %}
|
{% if request.event.settings.cancel_allow_user_paid_require_approval and request.event.settings.cancel_allow_user_paid_require_approval_fee_unknown %}
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You can request to cancel this order.
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
If your request is approved, the organizer will determine if you will receive a
|
||||||
|
full refund or if a cancellation fee is deducted according to their cancellation
|
||||||
|
policy.
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% if request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "force" %}
|
||||||
|
{% trans "The refund will be issued in form of a gift card that you can use for further purchases." %}
|
||||||
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "option" %}
|
||||||
|
{% trans "The refund can be issued to your original payment method or as a gift card." %}
|
||||||
|
{% elif request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "off" %}
|
||||||
|
{% trans "The refund will be issued to your original payment method." %}
|
||||||
|
{% endif %}
|
||||||
|
{% trans "This will invalidate all tickets in this order." %}
|
||||||
|
</p>
|
||||||
|
{% elif order.user_cancel_fee >= order.total %}
|
||||||
<p>
|
<p>
|
||||||
{% if request.event.settings.cancel_allow_user_paid_require_approval %}
|
{% if request.event.settings.cancel_allow_user_paid_require_approval %}
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
|
|||||||
@@ -22,12 +22,25 @@
|
|||||||
data-asynctask
|
data-asynctask
|
||||||
class="">
|
class="">
|
||||||
{% if request.event.settings.cancel_allow_user_paid_require_approval and order.status == "p" and order.total != 0 %}
|
{% if request.event.settings.cancel_allow_user_paid_require_approval and order.status == "p" and order.total != 0 %}
|
||||||
<p>
|
{% if request.event.settings.cancel_allow_user_paid_require_approval_fee_unknown %}
|
||||||
{% blocktrans trimmed %}
|
<p>
|
||||||
You can request the cancellation of your order on this page. The event organizer will then decide
|
{% blocktrans trimmed %}
|
||||||
on your request. If they approve, your order will be canceled and all tickets will be invalidated.
|
You can request to cancel this order.
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
</p>
|
{% blocktrans trimmed %}
|
||||||
|
If your request is approved, the organizer will determine if you will receive a
|
||||||
|
full refund or if a cancellation fee is deducted according to their cancellation
|
||||||
|
policy.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<p>
|
||||||
|
{% blocktrans trimmed %}
|
||||||
|
You can request the cancellation of your order on this page. The event organizer will then decide
|
||||||
|
on your request. If they approve, your order will be canceled and all tickets will be invalidated.
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>
|
<p>
|
||||||
{% blocktrans trimmed %}
|
{% blocktrans trimmed %}
|
||||||
@@ -37,6 +50,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not request.event.settings.cancel_allow_user_paid_require_approval or not request.event.settings.cancel_allow_user_paid_require_approval_fee_unknown %}
|
||||||
{% if request.event.settings.cancel_allow_user_paid_adjust_fees and order.status == "p" and order.total != 0 %}
|
{% if request.event.settings.cancel_allow_user_paid_adjust_fees and order.status == "p" and order.total != 0 %}
|
||||||
<p>
|
<p>
|
||||||
{% if cancel_fee %}
|
{% if cancel_fee %}
|
||||||
@@ -82,6 +96,7 @@
|
|||||||
<strong>{% trans "Refund amount:" %}</strong> {{ refund_amount|money:request.event.currency }}
|
<strong>{% trans "Refund amount:" %}</strong> {{ refund_amount|money:request.event.currency }}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if refund_amount %}
|
{% if refund_amount %}
|
||||||
{% if request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "manually" %}
|
{% if request.event.settings.cancel_allow_user_paid_refund_as_giftcard == "manually" %}
|
||||||
|
|||||||
Reference in New Issue
Block a user