diff --git a/root/usr/share/smanager/themes/AdminLTE/public/koozali/css/adminlte.koozali.css b/root/usr/share/smanager/themes/AdminLTE/public/koozali/css/adminlte.koozali.css index 61bacae..c9c891e 100644 --- a/root/usr/share/smanager/themes/AdminLTE/public/koozali/css/adminlte.koozali.css +++ b/root/usr/share/smanager/themes/AdminLTE/public/koozali/css/adminlte.koozali.css @@ -111,6 +111,6 @@ html { -.user-table-max-width { +.user-table-max-wdith { max-width: 50%; } diff --git a/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/datetime.js b/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/datetime.js new file mode 100644 index 0000000..0f75a5b --- /dev/null +++ b/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/datetime.js @@ -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 +}); \ No newline at end of file diff --git a/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/nutups.js b/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/nutups.js index b511924..4f96db8 100644 --- a/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/nutups.js +++ b/root/usr/share/smanager/themes/AdminLTE/public/koozali/js/nutups.js @@ -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(); -}); \ No newline at end of file +}); diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/common_js.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/common_js.html.ep index 3f3f9b7..7ee40fa 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/common_js.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/common_js.html.ep @@ -4,6 +4,8 @@ %= javascript 'dist/js/popper.min.js' %= javascript 'dist/js/adminlte.min.js' +%= javascript 'koozali/js/datetime.js' +%= javascript 'koozali/js/nutups.js' %= javascript 'koozali/js/flag-by-locale.js' %= javascript 'koozali/js/sme-password.js' diff --git a/root/usr/share/smanager/themes/AdminLTE/templates/datetime.html.ep b/root/usr/share/smanager/themes/AdminLTE/templates/datetime.html.ep index b0c5114..1058372 100644 --- a/root/usr/share/smanager/themes/AdminLTE/templates/datetime.html.ep +++ b/root/usr/share/smanager/themes/AdminLTE/templates/datetime.html.ep @@ -4,205 +4,216 @@
<%= dumper $c->current_route %> - <%= dumper $dat_datas %> + <%= dumper $dat_data %>% } - % if ( stash 'error' ) { -