From 5d251c72663f85215102c2cd23ec07020035b02c Mon Sep 17 00:00:00 2001 From: Mirror Date: Thu, 1 Feb 2024 18:03:34 +0200 Subject: [PATCH] form__fix --- js/forms.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/js/forms.js b/js/forms.js index 7da7767..6052a10 100644 --- a/js/forms.js +++ b/js/forms.js @@ -27,16 +27,8 @@ const activateFilters = () => { filterElement.classList.remove('ad-form--disabled'); }; -// const forms = ['.ad-form', '.map__filters'].map((selector) => { -// const formElement = document.querySelector(`${selector}`); -// return { -// formElement, -// partElements: formElement.querySelectorAll('fieldset, select') -// }; -// }); - const forms = ['.ad-form', '.map__filters'].map((selector) => { - const formElement = document.querySelector(`${selector}`); + formElement.document.querySelector(`${selector}`); //Возвращаем новый объект: каждой формы, все поля форм, и класс disabled формы return { formElement,