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

@@ -55,8 +55,8 @@ include('includes/sysstats.php');
<form action="system_info" method="POST">
<?php echo CSRFTokenFieldTag() ?>
<?php if (!RASPI_MONITOR_ENABLED) : ?>
<input type="submit" class="btn btn-warning" name="system_reboot" value="<?php echo _("Reboot"); ?>" />
<input type="submit" class="btn btn-warning" name="system_shutdown" value="<?php echo _("Shutdown"); ?>" />
<input type="button" class="btn btn-warning" id="js-sys-reboot" data-action="reboot" value="<?php echo _("Reboot"); ?>" />
<input type="button" class="btn btn-warning" id="js-sys-shutdown" data-action="shutdown" value="<?php echo _("Shutdown"); ?>" />
<?php endif ?>
<button type="button" onClick="window.location.reload();" class="btn btn-outline btn-primary"><i class="fas fa-sync-alt"></i> <?php echo _("Refresh") ?></a>
</form>