diff --git a/src/pretix/control/forms/orders.py b/src/pretix/control/forms/orders.py index ef02c26339..8110031382 100644 --- a/src/pretix/control/forms/orders.py +++ b/src/pretix/control/forms/orders.py @@ -159,7 +159,7 @@ class ReactivateOrderForm(ForceQuotaConfirmationForm): pass -class CancelForm(ForceQuotaConfirmationForm): +class CancelForm(forms.Form): send_email = forms.BooleanField( required=False, label=_('Notify customer by email'), @@ -188,6 +188,7 @@ class CancelForm(ForceQuotaConfirmationForm): ) def __init__(self, *args, **kwargs): + self.instance = kwargs.pop("instance") super().__init__(*args, **kwargs) change_decimal_field(self.fields['cancellation_fee'], self.instance.event.currency) self.fields['cancellation_fee'].widget.attrs['placeholder'] = floatformat( @@ -205,6 +206,20 @@ class CancelForm(ForceQuotaConfirmationForm): return val +class DenyForm(forms.Form): + send_email = forms.BooleanField( + required=False, + label=_('Notify customer by email'), + initial=True + ) + comment = forms.CharField( + label=_('Comment (will be sent to the user)'), + help_text=_('Will be included in the notification email when the respective placeholder is present in the ' + 'configured email text.'), + required=False, + ) + + class MarkPaidForm(ConfirmPaymentForm): send_email = forms.BooleanField( required=False, diff --git a/src/pretix/control/templates/pretixcontrol/order/deny.html b/src/pretix/control/templates/pretixcontrol/order/deny.html index a139909ea0..3c02c6f73b 100644 --- a/src/pretix/control/templates/pretixcontrol/order/deny.html +++ b/src/pretix/control/templates/pretixcontrol/order/deny.html @@ -1,5 +1,6 @@ {% extends "pretixcontrol/event/base.html" %} {% load i18n %} +{% load bootstrap3 %} {% block title %} {% trans "Deny order" %} {% endblock %} @@ -13,16 +14,7 @@