Widget: Fix opening a subevent dynamically (#4876)

This commit is contained in:
Raphael Michel
2025-02-28 11:18:11 +01:00
committed by GitHub
parent 012eda66bd
commit 79975e6174

View File

@@ -1978,9 +1978,13 @@ var shared_root_computed = {
}, },
formAction: function () { formAction: function () {
if (!this.useIframe && this.is_button && this.items.length === 0) { if (!this.useIframe && this.is_button && this.items.length === 0) {
var target = this.target_url; var target;
if (this.voucher_code) { if (this.voucher_code) {
target = this.target_url + 'redeem'; target = this.target_url + 'redeem';
} else if (this.subevent) {
target = this.target_url + this.subevent + '/';
} else {
target = this.target_url;
} }
return target; return target;
} }