mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
add send_email field to mark-paid
This commit is contained in:
@@ -104,7 +104,7 @@ class ConfirmPaymentForm(forms.Form):
|
||||
class CancelForm(ConfirmPaymentForm):
|
||||
send_email = forms.BooleanField(
|
||||
required=False,
|
||||
label=_('Notify user by e-mail'),
|
||||
label=_('Notify customer by email'),
|
||||
initial=True
|
||||
)
|
||||
cancellation_fee = forms.DecimalField(
|
||||
@@ -139,6 +139,11 @@ class CancelForm(ConfirmPaymentForm):
|
||||
|
||||
|
||||
class MarkPaidForm(ConfirmPaymentForm):
|
||||
send_email = forms.BooleanField(
|
||||
required=False,
|
||||
label=_('Notify customer by email'),
|
||||
initial=True
|
||||
)
|
||||
amount = forms.DecimalField(
|
||||
required=True,
|
||||
max_digits=10, decimal_places=2,
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
{% bootstrap_form_errors form %}
|
||||
{% bootstrap_field form.amount layout='horizontal' %}
|
||||
{% bootstrap_field form.payment_date layout='horizontal' %}
|
||||
{% bootstrap_field form.send_email layout='horizontal' %}
|
||||
{% if form.force %}
|
||||
{% bootstrap_field form.force layout='horizontal' horizontal_label_class='sr-only' horizontal_field_class='col-md-12' %}
|
||||
{% endif %}
|
||||
|
||||
@@ -1105,6 +1105,7 @@ class OrderTransition(OrderView):
|
||||
|
||||
try:
|
||||
p.confirm(user=self.request.user, count_waitinglist=False, payment_date=payment_date,
|
||||
send_mail=self.mark_paid_form.cleaned_data['send_email'],
|
||||
force=self.mark_paid_form.cleaned_data.get('force', False))
|
||||
except Quota.QuotaExceededException as e:
|
||||
p.state = OrderPayment.PAYMENT_STATE_FAILED
|
||||
|
||||
Reference in New Issue
Block a user