remotes/1693045480750635534/spooky-22
Aevann1 2021-07-24 20:44:20 +02:00
parent ac7bea37f3
commit 24bf6aeefe
1 changed files with 14 additions and 6 deletions

View File

@ -225,13 +225,21 @@
this.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting comment';
this.disabled = true;
post('/api/flag/comment/' + id,
callback = function() {
var xhr = new XMLHttpRequest();
xhr.open("POST", '/api/flag/comment/'+id, true);
var form = new FormData()
form.append("formkey", formkey());
form.append("reason", document.getElementById("reason").value);
document.getElementById("reportCommentFormBefore").classList.add('d-none');
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
}
)
xhr.withCredentials=true;
xhr.onload=function() {
document.getElementById("reportCommentFormBefore").classList.add('d-none');
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
};
xhr.onerror=function(){alert(errortext)};
xhr.send(form);
}
};