master
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.innerHTML='<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Reporting comment';
this.disabled = true; this.disabled = true;
post('/api/flag/comment/' + id, var xhr = new XMLHttpRequest();
callback = function() { 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'); xhr.withCredentials=true;
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
} 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);
} }
}; };