Ajaxify system reboot/shutdown

This commit is contained in:
billz
2023-10-08 19:21:43 +02:00
parent 2ac5f94594
commit 21f703b5a9
4 changed files with 32 additions and 11 deletions

View File

@@ -354,6 +354,15 @@ $('#js-system-reset-confirm').on('click', function (e) {
});
});
$('#js-sys-reboot, #js-sys-shutdown').on('click', function (e) {
e.preventDefault();
var csrfToken = $('meta[name=csrf_token]').attr('content');
var action = $(this).data('action');
$.post('ajax/system/sys_actions.php?',{'a': action, 'csrf_token': csrfToken},function(data){
var response = JSON.parse(data);
});
});
$(document).ready(function(){
$("#PanelManual").hide();
});