fixed a bug in ACP where you could accidentally delete or ban a user even if you clicked on cancel.

v1.18.x
psychobunny 12 years ago
parent 619dd84d81
commit f85a514ee3

@ -91,7 +91,9 @@
if(!isAdmin) {
bootbox.confirm('Do you really want to delete "' + parent.attr('data-username') +'"?', function(confirm) {
socket.emit('api:admin.user.deleteUser', uid);
if (confirm) {
socket.emit('api:admin.user.deleteUser', uid);
}
});
}
@ -112,9 +114,11 @@
parent.attr('data-banned', 0);
} else {
bootbox.confirm('Do you really want to ban "' + parent.attr('data-username') +'"?', function(confirm) {
socket.emit('api:admin.user.banUser', uid);
banBtn.addClass('btn-warning');
parent.attr('data-banned', 1);
if (confirm) {
socket.emit('api:admin.user.banUser', uid);
banBtn.addClass('btn-warning');
parent.attr('data-banned', 1);
}
});
}
}

Loading…
Cancel
Save