blob: 81565a00d823da73aaacdaec6dd1502ee42606c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
export const updateElementsVisibility = (selector, isVisible) => {
document.querySelectorAll(selector).forEach(elem => elem.classList.toggle('hidden', !isVisible));
};
export const updateFormAction = (selector, basePath, path) => {
const form = document.querySelector(selector);
if (form) {
form.action = `${basePath}${path}`;
}
};
|