forked from CGM_Public/pretix_original
Add bulk operations for orders (#3548)
* Add bulk operations for orders * UI tweaks * Fix test failures * Fix filter form * Add tests * Run isort
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user