Fix form handling for user feedback

issue was noticed on demo site, but possibly existed elsewhere?  also not 100%
sure about this fix, but it's believed to be okay...
This commit is contained in:
Lance Edgar 2019-08-04 22:14:15 -05:00
parent 287464362e
commit fda7230bce
2 changed files with 14 additions and 12 deletions

View file

@ -27,8 +27,13 @@ let FeedbackForm = {
}
this.$http.post(this.action, params, {headers: headers}).then(({ data }) => {
this.showDialog = false
alert("Message successfully sent.\n\nThank you for your feedback.")
if (data.ok) {
alert("Message successfully sent.\n\nThank you for your feedback.")
this.showDialog = false
} else {
alert("Sorry! Your message could not be sent.\n\n"
+ "Please try to contact the site admin some other way.")
}
})
},
}