diff --git a/kitsune/wiki/jinja2/wiki/includes/survey_form.html b/kitsune/wiki/jinja2/wiki/includes/survey_form.html index b72d4e7cd3f..f154a3b4cdb 100644 --- a/kitsune/wiki/jinja2/wiki/includes/survey_form.html +++ b/kitsune/wiki/jinja2/wiki/includes/survey_form.html @@ -10,20 +10,28 @@ }, handleSubmit() { if (this.validateForm()) { - trackEvent('article_survey_submitted', { + trackEvent('article_survey_submitted', { survey_type: '{{ survey_type }}', - reason: this.selectedReason + reason: this.selectedReason }); return true; // Allow HTMX to proceed with submission } return false; }, - closeSurvey() { + closeSurvey(message) { const surveyType = '{{ survey_type }}'.trim(); if (surveyType) { trackEvent('article_survey_closed', { survey_type: surveyType }); } - document.querySelector('.document-vote').remove(); + const survey = document.querySelector('.document-vote'); + if (message) { + this.responseMessage = message; + setTimeout(() => { + survey.remove(); + }, 5000); + } else { + survey.remove(); + } } }" x-init=" const surveyType = '{{ survey_type }}'.trim(); @@ -76,7 +84,8 @@

-