diff --git a/assets/app.js b/assets/app.js index cb69778..0db5fd4 100644 --- a/assets/app.js +++ b/assets/app.js @@ -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'); + }); + } + }); + } + }); diff --git a/templates/public/edit.html.twig b/templates/public/edit.html.twig index 0bae6e2..aa92c69 100644 --- a/templates/public/edit.html.twig +++ b/templates/public/edit.html.twig @@ -88,7 +88,21 @@ {{ 'display.submit'|trans }} +