mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fixed payment and ticketoutput enable/disable switches and their
implications
This commit is contained in:
@@ -75,8 +75,8 @@ class SettingsForm(forms.Form):
|
|||||||
This form is meant to be used for modifying Event- or OrganizerSettings
|
This form is meant to be used for modifying Event- or OrganizerSettings
|
||||||
"""
|
"""
|
||||||
BOOL_CHOICES = (
|
BOOL_CHOICES = (
|
||||||
('True', _('enabled')),
|
|
||||||
('False', _('disabled')),
|
('False', _('disabled')),
|
||||||
|
('True', _('enabled')),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
@@ -98,10 +98,9 @@ class BasePaymentProvider:
|
|||||||
"""
|
"""
|
||||||
return OrderedDict([
|
return OrderedDict([
|
||||||
('_enabled',
|
('_enabled',
|
||||||
forms.ChoiceField(
|
forms.BooleanField(
|
||||||
label=_('Enable payment method'),
|
label=_('Enable payment method'),
|
||||||
required=False,
|
required=False,
|
||||||
choices=SettingsForm.BOOL_CHOICES,
|
|
||||||
)),
|
)),
|
||||||
('_fee_abs',
|
('_fee_abs',
|
||||||
forms.DecimalField(
|
forms.DecimalField(
|
||||||
|
|||||||
@@ -86,10 +86,9 @@ class BaseTicketOutput:
|
|||||||
"""
|
"""
|
||||||
return OrderedDict([
|
return OrderedDict([
|
||||||
('_enabled',
|
('_enabled',
|
||||||
forms.ChoiceField(
|
forms.BooleanField(
|
||||||
label=_('Enable output'),
|
label=_('Enable output'),
|
||||||
required=False,
|
required=False,
|
||||||
choices=SettingsForm.BOOL_CHOICES,
|
|
||||||
)),
|
)),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,8 @@ class PaymentDetails(EventViewMixin, CartDisplayMixin, EventLoginRequiredMixin,
|
|||||||
return redirect(self.get_confirm_url())
|
return redirect(self.get_confirm_url())
|
||||||
else:
|
else:
|
||||||
return self.get(request, *args, **kwargs)
|
return self.get(request, *args, **kwargs)
|
||||||
|
messages.error(self.request, _("Please select a payment method."))
|
||||||
|
return self.get(request, *args, **kwargs)
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
ctx = super().get_context_data(**kwargs)
|
ctx = super().get_context_data(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user