forked from CGM_Public/pretix_original
Widget: Fix waiting list integration of seated events (#3323)
This commit is contained in:
@@ -33,7 +33,7 @@ from django.views.generic import FormView, TemplateView
|
||||
from pretix.base.models import Quota, SubEvent
|
||||
from pretix.base.templatetags.urlreplace import url_replace
|
||||
from pretix.multidomain.urlreverse import eventreverse
|
||||
from pretix.presale.views import EventViewMixin
|
||||
from pretix.presale.views import EventViewMixin, iframe_entry_view_wrapper
|
||||
|
||||
from ...base.i18n import get_language_without_region
|
||||
from ...base.models import Voucher, WaitingListEntry
|
||||
@@ -42,6 +42,7 @@ from . import allow_frame_if_namespaced
|
||||
|
||||
|
||||
@method_decorator(allow_frame_if_namespaced, 'dispatch')
|
||||
@method_decorator(iframe_entry_view_wrapper, 'dispatch')
|
||||
class WaitingView(EventViewMixin, FormView):
|
||||
template_name = 'pretixpresale/event/waitinglist.html'
|
||||
form_class = WaitingListForm
|
||||
|
||||
@@ -894,7 +894,7 @@ Vue.component('pretix-widget-event-form', {
|
||||
+ strings['seating_plan_waiting_list']
|
||||
+ '</div>'
|
||||
+ '<div class="pretix-widget-seating-waitinglist-button-wrap">'
|
||||
+ '<button class="pretix-widget-seating-waitinglist-button" @click.prevent.stop="$root.startseating">'
|
||||
+ '<button class="pretix-widget-seating-waitinglist-button" @click.prevent.stop="$root.startwaiting">'
|
||||
+ strings['waiting_list']
|
||||
+ '</button>'
|
||||
+ '</div>'
|
||||
@@ -1649,6 +1649,20 @@ var shared_root_methods = {
|
||||
}
|
||||
});
|
||||
},
|
||||
startwaiting: function () {
|
||||
var redirect_url = this.$root.target_url + 'w/' + widget_id;
|
||||
if (this.$root.subevent){
|
||||
redirect_url += '/' + this.$root.subevent;
|
||||
}
|
||||
redirect_url += '/waitinglist/?iframe=1&locale=' + lang;
|
||||
if (this.$root.useIframe) {
|
||||
var iframe = this.$root.overlay.$children[0].$refs['frame-container'].children[0];
|
||||
this.$root.overlay.frame_loading = true;
|
||||
iframe.src = redirect_url;
|
||||
} else {
|
||||
window.open(redirect_url);
|
||||
}
|
||||
},
|
||||
startseating: function () {
|
||||
var redirect_url = this.$root.target_url + 'w/' + widget_id;
|
||||
if (this.$root.subevent){
|
||||
|
||||
Reference in New Issue
Block a user