save scheduler settings

This commit is contained in:
Justin 2023-04-22 18:12:09 +08:00 committed by GitHub
parent c1dc100bca
commit ae4332fa6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2627,3 +2627,30 @@ function closeScheduler() {
document.getElementById('scheduler-div').style.display = "none"; document.getElementById('scheduler-div').style.display = "none";
} }
// save scheduler settings
function saveSchedulerSettings() {
let shutdown_hour = document.getElementById("shutdown-hour-select").value;
let shutdown_minute = document.getElementById("shutdown-minute-select").value;
let shutdown_enabled = document.getElementById("shutdown-enabled").checked;
let reboot_hour = document.getElementById("reboot-hour-select").value;
let reboot_minute = document.getElementById("reboot-minute-select").value;
let reboot_enabled = document.getElementById("reboot-enabled").checked;
let timezone = document.getElementById("timezone-select").value;
let settings = {
shutdown_hour: shutdown_hour,
shutdown_minute: shutdown_minute,
shutdown_enabled: shutdown_enabled,
reboot_hour: reboot_hour,
reboot_minute: reboot_minute,
reboot_enabled: reboot_enabled,
timezone: timezone,
};
console.log(settings);
}