fdfd
This commit is contained in:
parent
832250f210
commit
126a3da430
1 changed files with 14 additions and 6 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue