1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-10-27 20:32:28 +01:00

Fix issue #546 by adding swal to logouts (#634)

This commit is contained in:
Lance Pioch 2017-09-21 01:16:52 -04:00 committed by Dane Everitt
parent afa328577f
commit 0a0a8784a9
2 changed files with 24 additions and 6 deletions

View File

@ -196,9 +196,18 @@
<script>
$('#logoutButton').on('click', function (event) {
event.preventDefault();
if (confirm('Are you sure you want to logout?')) {
window.location = $(this).attr('href');
}
var that = this;
swal({
title: 'Do you want to log out?',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#d9534f',
cancelButtonColor: '#d33',
confirmButtonText: 'Log out'
}, function () {
window.location = $(that).attr('href');
});
});
</script>
@endif

View File

@ -289,9 +289,18 @@
<script>
$('#logoutButton').on('click', function (event) {
event.preventDefault();
if (confirm('Are you sure you want to logout?')) {
window.location = $(this).attr('href');
}
var that = this;
swal({
title: 'Do you want to log out?',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#d9534f',
cancelButtonColor: '#d33',
confirmButtonText: 'Log out'
}, function () {
window.location = $(that).attr('href');
});
});
</script>
@endif