From b8ec37d0af363719596ea62475bd53e40bf390d5 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Wed, 24 Jul 2024 15:14:41 +0200 Subject: [PATCH] adjust check runs on page load --- install/index.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/install/index.php b/install/index.php index f6cfc62ad..11dcd3162 100644 --- a/install/index.php +++ b/install/index.php @@ -1163,7 +1163,7 @@ if (!file_exists('.lock')) { if (db_hostname === '' || db_username === '' || db_name === '') { $('#db_connection_testresult').addClass('alert-danger'); - $('#db_connection_testresult').html(''); + $('#db_connection_testresult').html(''); return; } @@ -1251,11 +1251,11 @@ if (!file_exists('.lock')) { // Check various user input in tab 4 // user password - var passwordField = $('#password'); - var cnfmPasswordField = $('#cnfm_password'); - var minPasswordLenght = 8; + let passwordField = $('#password'); + let cnfmPasswordField = $('#cnfm_password'); + let minPasswordLenght = 8; - $('#password, #cnfm_password').on('change', function() { + function user_pwd_check() { if (cnfmPasswordField.val() == passwordField.val() && cnfmPasswordField.val() != '') { if (cnfmPasswordField.val().length >= minPasswordLenght) { @@ -1302,7 +1302,7 @@ if (!file_exists('.lock')) { $('#userform_warnings').html(''); } - }); + } // email verification const emailField = $('#user_email'); @@ -1423,14 +1423,22 @@ if (!file_exists('.lock')) { $('#resetButton').click(function() { $('#resetModal').modal('show'); }); - - db_connection_test() + if ($('#db_hostname').val() != '') { + db_connection_test() + } // Clear DB Test results on change $('#db_hostname, #db_name, #db_username, #db_password').on('keyup', function() { clear_db_testresult(); }); + $('#cnfm_password').on('change focusout', function() { + user_pwd_check(); + }); + if ($('#cnfm_password').val() != '') { + user_pwd_check(); + } + // Checklist Stuff checklist_configuration(); $('#directory, #websiteurl').on('change', function() { @@ -1508,6 +1516,7 @@ if (!file_exists('.lock')) { // comment: Checklist for Pre-Checks is handled in PHP. See '$prechecks_passed' function checklist_configuration() { + console.log('run checklist_configuration'); var checklist_configuration = true; if ($('#directory').hasClass('is-invalid')) {