mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24: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
|
||||
"""
|
||||
BOOL_CHOICES = (
|
||||
('True', _('enabled')),
|
||||
('False', _('disabled')),
|
||||
('True', _('enabled')),
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -98,10 +98,9 @@ class BasePaymentProvider:
|
||||
"""
|
||||
return OrderedDict([
|
||||
('_enabled',
|
||||
forms.ChoiceField(
|
||||
forms.BooleanField(
|
||||
label=_('Enable payment method'),
|
||||
required=False,
|
||||
choices=SettingsForm.BOOL_CHOICES,
|
||||
)),
|
||||
('_fee_abs',
|
||||
forms.DecimalField(
|
||||
|
||||
@@ -86,10 +86,9 @@ class BaseTicketOutput:
|
||||
"""
|
||||
return OrderedDict([
|
||||
('_enabled',
|
||||
forms.ChoiceField(
|
||||
forms.BooleanField(
|
||||
label=_('Enable output'),
|
||||
required=False,
|
||||
choices=SettingsForm.BOOL_CHOICES,
|
||||
)),
|
||||
])
|
||||
|
||||
|
||||
@@ -174,6 +174,8 @@ class PaymentDetails(EventViewMixin, CartDisplayMixin, EventLoginRequiredMixin,
|
||||
return redirect(self.get_confirm_url())
|
||||
else:
|
||||
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):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user