diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index dcdbc58f1..69fab1879 100755 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -108,9 +108,16 @@ function delete_commentModal(id) { this.innerHTML='Deleting comment'; this.disabled = true; - post('/delete/comment/' + id) + + var url = '/delete_comment/' + id + var xhr = new XMLHttpRequest(); + xhr.open("POST", url, true); + var form = new FormData() + form.append("formkey", formkey()); + xhr.withCredentials=true; xhr.onload = function() {location.reload(true);}; - } + xhr.send(form); +} }; diff --git a/files/templates/comments.html b/files/templates/comments.html index 422006292..087781d0c 100755 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -26,7 +26,7 @@ {% if v %} {% include "award_modal.html" %} - + {% endif %} diff --git a/files/templates/submission.html b/files/templates/submission.html index 151bb886f..0d090bf31 100755 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -53,7 +53,7 @@ {% if v %} - + {% include "award_modal.html" %} {% include "emoji_modal.html" %} {% include "gif_modal.html" %}