fds
This commit is contained in:
parent
aeeac05f2a
commit
80e5c77d0a
4 changed files with 9 additions and 7 deletions
|
@ -51,7 +51,11 @@ function report_commentModal(id, author) {
|
|||
document.getElementById("reportCommentFormBefore").classList.remove('d-none');
|
||||
document.getElementById("reportCommentFormAfter").classList.add('d-none');
|
||||
|
||||
document.getElementById("reportCommentButton").onclick = function() {
|
||||
btn = document.getElementById("reportCommentButton")
|
||||
btn.innerHTML='Report comment';
|
||||
btn.disabled = false;
|
||||
|
||||
btn.onclick = function() {
|
||||
this.innerHTML='Reporting comment';
|
||||
this.disabled = true;
|
||||
const xhr = new XMLHttpRequest();
|
||||
|
@ -64,8 +68,6 @@ function report_commentModal(id, author) {
|
|||
xhr.onload=function() {
|
||||
document.getElementById("reportCommentFormBefore").classList.add('d-none');
|
||||
document.getElementById("reportCommentFormAfter").classList.remove('d-none');
|
||||
this.innerHTML='Report comment';
|
||||
this.disabled = false;
|
||||
};
|
||||
|
||||
xhr.onerror=function(){alert(errortext)};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue