gf
This commit is contained in:
parent
a69c5351fe
commit
f3bb52e379
34 changed files with 3208 additions and 3185 deletions
|
@ -1,22 +1,22 @@
|
|||
function banModal(link, id, name) {
|
||||
document.getElementById("banModalTitle").innerHTML = `Ban @${name}`;
|
||||
document.getElementById("ban-modal-link").value = link;
|
||||
document.getElementById("banUserButton").innerHTML = `Ban @${name}`;
|
||||
document.getElementById("banModalTitle").innerHTML = `Ban @${name}`;
|
||||
document.getElementById("ban-modal-link").value = link;
|
||||
document.getElementById("banUserButton").innerHTML = `Ban @${name}`;
|
||||
|
||||
document.getElementById("banUserButton").onclick = function() {
|
||||
let fd = new FormData(document.getElementById("banModalForm"));
|
||||
fd.append("formkey", formkey());
|
||||
document.getElementById("banUserButton").onclick = function() {
|
||||
let fd = new FormData(document.getElementById("banModalForm"));
|
||||
fd.append("formkey", formkey());
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", `/ban_user/${id}?form`);
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", `/ban_user/${id}?form`);
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
|
||||
xhr.onload = function(){
|
||||
var myToast = bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
document.getElementById('toast-post-success-text').innerHTML = `@${name} banned`;
|
||||
}
|
||||
xhr.onload = function(){
|
||||
var myToast = bootstrap.Toast.getOrCreateInstance(document.getElementById('toast-post-success'));
|
||||
myToast.show();
|
||||
document.getElementById('toast-post-success-text').innerHTML = `@${name} banned`;
|
||||
}
|
||||
|
||||
xhr.send(fd);
|
||||
}
|
||||
xhr.send(fd);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue