From 79975e6174be1055ffcafda478eac5b6d6f8e22b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 28 Feb 2025 11:18:11 +0100 Subject: [PATCH] Widget: Fix opening a subevent dynamically (#4876) --- src/pretix/static/pretixpresale/js/widget/widget.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js index d3f99c803f..d8f922cc11 100644 --- a/src/pretix/static/pretixpresale/js/widget/widget.js +++ b/src/pretix/static/pretixpresale/js/widget/widget.js @@ -1978,9 +1978,13 @@ var shared_root_computed = { }, formAction: function () { if (!this.useIframe && this.is_button && this.items.length === 0) { - var target = this.target_url; + var target; if (this.voucher_code) { target = this.target_url + 'redeem'; + } else if (this.subevent) { + target = this.target_url + this.subevent + '/'; + } else { + target = this.target_url; } return target; }