forked from CGM_Public/pretix_original
Check Event.presale_is_running in more places
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
{% block title %}{% trans "Presale" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if cart.positions %}
|
||||
{% if cart.positions and event.presale_is_running %}
|
||||
<div class="panel panel-primary cart">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{% trans "Your cart" %}</h3>
|
||||
|
||||
@@ -22,6 +22,10 @@ class CheckoutView(View):
|
||||
messages.error(request, _("Your cart is empty"))
|
||||
return redirect(eventreverse(self.request.event, 'presale:event.index'))
|
||||
|
||||
if not request.event.presale_is_running:
|
||||
messages.error(request, _("The presale for this event is over or has not yet started."))
|
||||
return redirect(eventreverse(self.request.event, 'presale:event.index'))
|
||||
|
||||
cart_error = None
|
||||
try:
|
||||
validate_cart.send(sender=self.request.event, positions=cart_pos)
|
||||
|
||||
Reference in New Issue
Block a user