This commit is contained in:
Aevann1 2021-10-16 11:57:40 +02:00
parent 3547578a08
commit f5f85db0cd
3 changed files with 11 additions and 4 deletions

View file

@ -108,9 +108,16 @@ function delete_commentModal(id) {
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>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);
}
};