diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html
index 0aca73b81..7dd37bdc8 100644
--- a/files/templates/award_modal.html
+++ b/files/templates/award_modal.html
@@ -9,29 +9,7 @@
xhr.withCredentials=true;
xhr.onload = function() {
- if (xhr.status==204) {}
- else if (xhr.status >= 200 && xhr.status < 300) {
- $('#toast-post-success').toast('dispose');
- $('#toast-post-success').toast('show');
- document.getElementById('toast-post-success-text').innerText = JSON.parse(xhr.response)["message"];
- callback(xhr)
- return true
-
- } else if (xhr.status >= 300 && xhr.status < 400) {
- window.location.href = JSON.parse(xhr.response)["redirect"]
- } else {
- data=JSON.parse(xhr.response);
-
- $('#toast-post-error').toast('dispose');
- $('#toast-post-error').toast('show');
- document.getElementById('toast-post-error-text').innerText = data["error"];
- return false
-
- }
- };
-
xhr.send(form);
-
}
var upvote = function(event) {
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 1b0a1adb6..de7aa453c 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -372,8 +372,10 @@
document.getElementById(button1).classList.toggle("d-md-inline-block");
document.getElementById(button2).classList.toggle("d-md-inline-block");
- document.getElementById('toast-post-success').toast('dispose');
- document.getElementById('toast-post-success').toast('show');
+ var myToast = new bootstrap.Toast(document.getElementById('toast-post-success'));
+ myToast.hide();
+ myToast.show();
+
if (distinguish=='yes') {
document.getElementById('toast-post-success-text').innerText = "Comment distinguished!";
}