From 33bd36b70f751f6f8d09412a192c3a81895ba8b2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 26 Aug 2024 14:52:14 -0500 Subject: [PATCH] fix: allow custom base template to add params to feedback form --- src/wuttaweb/templates/base.mako | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/wuttaweb/templates/base.mako b/src/wuttaweb/templates/base.mako index dbad2e2..55b2aa8 100644 --- a/src/wuttaweb/templates/base.mako +++ b/src/wuttaweb/templates/base.mako @@ -526,16 +526,21 @@ }) }, - sendFeedback() { - this.sendingFeedback = true - - const params = { + getParams() { + return { referrer: this.referrer, user_uuid: this.userUUID, user_name: this.userName, message: this.message.trim(), + ...this.getExtraParams(), } + }, + getExtraParams() {}, + + sendFeedback() { + this.sendingFeedback = true + const params = this.getParams() this.wuttaPOST(this.action, params, response => { this.$buefy.toast.open({