11.0.0-42.sme Update Nut Letsenc Datetime

This commit is contained in:
John Crisp
2025-06-19 17:58:31 +02:00
parent 4d47e099a6
commit 4204273b79
21 changed files with 754 additions and 828 deletions

View File

@@ -111,6 +111,6 @@ html {
.user-table-max-width {
.user-table-max-wdith {
max-width: 50%;
}

View File

@@ -0,0 +1,18 @@
document.addEventListener('DOMContentLoaded', function() {
var select = document.getElementById('time_mode_select');
var ntpSection = document.getElementById('ntp_section');
var manualSection = document.getElementById('manual_section');
function toggleSections() {
if (select.value === 'dat_manually_set') {
ntpSection.style.display = 'none';
manualSection.style.display = 'block';
} else {
ntpSection.style.display = 'block';
manualSection.style.display = 'none';
}
}
select.addEventListener('change', toggleSections);
toggleSections(); // Set initial state
});

View File

@@ -1,12 +1,16 @@
$(document).ready(function() {
function toggleUPSClasses() {
var selectedOption = $('#Nutmode_select').val();
var upsModelValue = $('#UPS_Model_select').val().toLowerCase(); // Get the current value from UPS_Model
$('.masterups').toggle(selectedOption === 'netserver' || selectedOption === 'standalone'); // Show/Hide masterups based on Net Server or Standalone
$('.secondaryups').toggle(selectedOption === 'netserver' ); // Show/Hide Secondary logins for net server
$('.slaveups').toggle(selectedOption === 'netclient'); // Show/Hide slaveups based on Net Client
$('.generics').toggle(selectedOption !== 'netclient' && upsModelValue === 'genericups' );
// Enable/Disable inputs based on the selected option
$('.masterups input').prop('disabled', !(selectedOption === 'netserver' || selectedOption === 'standalone'));
$('.slaveups input').prop('disabled', selectedOption !== 'netclient');
$('.generics input').prop('disabled', selectedOption === 'netclient');
}
function toggleGenerics() {
@@ -25,4 +29,4 @@ $(document).ready(function() {
// Set the initial state based on current selections
toggleGenerics();
toggleUPSClasses();
});
});