mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
button toggle show all
This commit is contained in:
parent
1e02b7062d
commit
14f28ef405
2 changed files with 30 additions and 0 deletions
|
@ -34,5 +34,21 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
bodyLanding.style.backgroundColor = randombg;
|
||||
}
|
||||
|
||||
// Gestion du bouton pour afficher tous les champs
|
||||
const btnShowAllFields = document.querySelector('#showAllFields');
|
||||
if (btnShowAllFields) {
|
||||
console.log('btnShowAllFields détecté');
|
||||
btnShowAllFields.addEventListener('click', () => {
|
||||
// Sélectionner tous les inputs dans le formulaire
|
||||
const form = document.querySelector('form');
|
||||
if (form) {
|
||||
const hiddenInputs = form.querySelectorAll('.d-none');
|
||||
hiddenInputs.forEach(input => {
|
||||
input.classList.toggle('d-none');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue