Update Teruss
This commit is contained in:
@@ -577,9 +577,9 @@ $("#example10").DataTable({
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Aksi ketika tombol dengan ID tombol-logout ditekan
|
||||
$(document).on('click', '.tombol-logout', function(e) {
|
||||
e.preventDefault(); // Mencegah link langsung pindah
|
||||
// Apapun tombolnya, selama dia mengarah ke link logout, tangkap!
|
||||
$('a[href*="login/logout"]').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var link = $(this).attr('href');
|
||||
|
||||
Swal.fire({
|
||||
@@ -590,15 +590,14 @@ $("#example10").DataTable({
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Ya, Keluar!',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
cancelButtonText: 'Batal'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
window.location.href = link; // Lanjutkan proses logout jika klik Ya
|
||||
window.location.href = link;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user