From b0f49c79f5ef7853652e33bcdd0298e1fd00df55 Mon Sep 17 00:00:00 2001 From: Benoit Alessandroni <benoit@happy-dev.fr> Date: Tue, 21 Jul 2020 09:27:46 +0200 Subject: [PATCH] Checking the fields selector array length in a better way --- src/scripts/coopstarter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index c9678272..c920900b 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -672,7 +672,7 @@ function listenToInputChangeOnResourceCreation(originalForm) { } }); - if (isValid.length == 13) { + if (isValid.length == resourcesFieldsSelector.length) { submitInput.disabled = false; submitInput.classList.remove('disabled'); } else { @@ -691,7 +691,7 @@ function listenToInputChangeOnMentorAccountCompletion(originalForm) { } }); - if (isValid.length == 6) { + if (isValid.length == mentorFieldsSelector.length) { submitInput.disabled = false; submitInput.classList.remove('disabled'); } else { -- GitLab