diff --git a/AUTHORS b/AUTHORS index adcd0185c..33763008b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ an awesome project. Thank you all! Alexander Brock Ben Oswald Christian Franke + Christopher Dambamuromo Enrique Saez Flavia Bastos informancer diff --git a/src/pretix/control/context.py b/src/pretix/control/context.py index 3246cacf6..79bcb8912 100644 --- a/src/pretix/control/context.py +++ b/src/pretix/control/context.py @@ -27,10 +27,14 @@ def contextprocessor(request): _html_head.append(response) ctx['html_head'] = "".join(_html_head) + _js_payment_weekdays_disabled = '[]' _nav_event = [] if hasattr(request, 'event'): for receiver, response in nav_event.send(request.event, request=request): _nav_event += response + if request.event.settings.get('payment_term_weekdays'): + _js_payment_weekdays_disabled = '[0,6]' + ctx['js_payment_weekdays_disabled'] = _js_payment_weekdays_disabled ctx['nav_event'] = _nav_event ctx['js_datetime_format'] = get_javascript_format('DATETIME_INPUT_FORMATS') diff --git a/src/pretix/control/forms/orders.py b/src/pretix/control/forms/orders.py index bce66953f..76f86a991 100644 --- a/src/pretix/control/forms/orders.py +++ b/src/pretix/control/forms/orders.py @@ -13,7 +13,10 @@ class ExtendForm(I18nModelForm): model = Order fields = ['expires'] widgets = { - 'expires': forms.DateInput(attrs={'class': 'datepickerfield'}), + 'expires': forms.DateInput(attrs={ + 'class': 'datepickerfield', + 'data-is-payment-date': 'true' + }) } def clean(self): diff --git a/src/pretix/control/templates/pretixcontrol/base.html b/src/pretix/control/templates/pretixcontrol/base.html index 3d4c58c09..4a2d12900 100644 --- a/src/pretix/control/templates/pretixcontrol/base.html +++ b/src/pretix/control/templates/pretixcontrol/base.html @@ -35,7 +35,7 @@ - +