diff --git a/tailbone/forms/common.py b/tailbone/forms/common.py index 26934479..4d58b943 100644 --- a/tailbone/forms/common.py +++ b/tailbone/forms/common.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2021 Lance Edgar +# Copyright © 2010-2022 Lance Edgar # # This file is part of Rattail. # @@ -58,4 +58,7 @@ class Feedback(colander.Schema): user_name = colander.SchemaNode(colander.String(), missing=colander.null) + please_reply_to = colander.SchemaNode(colander.String(), + missing=colander.null) + message = colander.SchemaNode(colander.String()) diff --git a/tailbone/static/themes/falafel/js/tailbone.feedback.js b/tailbone/static/themes/falafel/js/tailbone.feedback.js index 11745ab4..6f687b80 100644 --- a/tailbone/static/themes/falafel/js/tailbone.feedback.js +++ b/tailbone/static/themes/falafel/js/tailbone.feedback.js @@ -5,6 +5,12 @@ let FeedbackForm = { mixins: [FormPosterMixin], methods: { + pleaseReplyChanged(value) { + this.$nextTick(() => { + this.$refs.userEmail.focus() + }) + }, + showFeedback() { this.showDialog = true this.$nextTick(function() { @@ -18,6 +24,7 @@ let FeedbackForm = { referrer: this.referrer, user: this.userUUID, user_name: this.userName, + please_reply_to: this.pleaseReply ? this.userEmail : null, message: this.message.trim(), } @@ -41,5 +48,7 @@ let FeedbackFormData = { referrer: null, userUUID: null, userName: null, + pleaseReply: false, + userEmail: null, showDialog: false, } diff --git a/tailbone/templates/themes/falafel/base.mako b/tailbone/templates/themes/falafel/base.mako index 9bd092ab..9b9236fe 100644 --- a/tailbone/templates/themes/falafel/base.mako +++ b/tailbone/templates/themes/falafel/base.mako @@ -487,7 +487,7 @@ - + Questions, suggestions, comments, complaints, etc. regarding this website are welcome and may be submitted below. @@ -516,6 +516,24 @@ + % if request.rattail_config.getbool('tailbone', 'feedback_allows_reply'): + + + + + Please email me back{{ pleaseReply ? " at: " : "" }} + + + + + + + + + % endif +
+
Questions, suggestions, comments, complaints, etc. regarding this website are welcome and may be submitted below. @@ -516,6 +516,24 @@ + % if request.rattail_config.getbool('tailbone', 'feedback_allows_reply'): +