From 9d0e71d6c890edee63642909814b839ee99caa4b Mon Sep 17 00:00:00 2001 From: pushuo <229102104@qq.com> Date: Wed, 7 Sep 2022 15:41:56 +0800 Subject: [PATCH] wip --- .../Views/environment-wizard.blade.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/beike/Installer/Views/environment-wizard.blade.php b/beike/Installer/Views/environment-wizard.blade.php index 2aac16a1..d211f9fd 100644 --- a/beike/Installer/Views/environment-wizard.blade.php +++ b/beike/Installer/Views/environment-wizard.blade.php @@ -162,9 +162,11 @@ getDatabaseStatus() } - $('#submit-button').click(function() { - $(this).prop('disabled', true).addClass('text-white').find('span').removeClass('d-none') - }) + // $('#submit-button').click(function() { + // setTimeout(() => { + // $(this).prop('disabled', true).addClass('text-white').find('span').removeClass('d-none') + // }, 0); + // }) }) // Example starter JavaScript for disabling form submissions if there are invalid fields @@ -173,18 +175,16 @@ // Loop over them and prevent submission Array.prototype.slice.call(forms).forEach(function(form) { - form.addEventListener( - "submit", - function(event) { - if (!form.checkValidity()) { - event.preventDefault(); - event.stopPropagation(); - } + form.addEventListener("submit", function(event) { + if (!form.checkValidity()) { + event.preventDefault(); + event.stopPropagation(); + } else { + $("#submit-button").prop('disabled', true).addClass('text-white').find('span').removeClass('d-none') + } - form.classList.add("was-validated"); - }, - false - ); + form.classList.add("was-validated"); + }, false); }); });