Skip to content

Commit fdc01f0

Browse files
authored
Merge pull request #5335 from akolson/reset-give-feedback-modal
Clears 'Give feedback' modal on submit/cancel
2 parents 70f3152 + 56a94e0 commit fdc01f0

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@
768768
},
769769
closeGiveFeedbackModal() {
770770
this.showFeedbackModal = false;
771+
this.clearGiveFeedbackForm();
771772
},
772773
handleViewMoreRecommendations() {
773774
if (!this.recommendationsLoadingError) {
@@ -967,10 +968,11 @@
967968
this.showSnackbar({ text: this.feedbackFailedMessage$() });
968969
}
969970
this.showFeedbackModal = false;
971+
this.clearGiveFeedbackForm();
970972
} else {
971973
this.showOtherFeedbackInvalidText = !this.isOtherFeedbackValid;
974+
this.showFeedbackErrorMessage = !this.isAnyFeedbackReasonSelected;
972975
}
973-
this.showFeedbackErrorMessage = !this.isAnyFeedbackReasonSelected;
974976
},
975977
formatRecommendationInteractionEventData(feedbackType, nodes) {
976978
const data = nodes.map(node => ({
@@ -997,6 +999,12 @@
997999
);
9981000
}
9991001
},
1002+
clearGiveFeedbackForm() {
1003+
this.feedbackReason = [];
1004+
this.otherFeedback = '';
1005+
this.showOtherFeedbackInvalidText = false;
1006+
this.showFeedbackErrorMessage = false;
1007+
},
10001008
},
10011009
$trs: {
10021010
backToBrowseAction: 'Back to browse',

0 commit comments

Comments
 (0)