diff --git a/webapp/WEB-INF/templates/admin/plugins/forms/create_form.html b/webapp/WEB-INF/templates/admin/plugins/forms/create_form.html index 2cf3ef6d6..d0598a98d 100644 --- a/webapp/WEB-INF/templates/admin/plugins/forms/create_form.html +++ b/webapp/WEB-INF/templates/admin/plugins/forms/create_form.html @@ -18,18 +18,22 @@ // Initial toggle based on checkbox state const endMessage = document.getElementById('endMessage'); const endMessageDisplay = document.getElementById('endMessageDisplay'); - + const labelEndMessageButton = document.getElementById('labelEndMessageButton'); + // Hide initially endMessage.classList.toggle('d-none', true); - + labelEndMessageButton.classList.toggle('d-none', true); + // Show if checkbox is checked if (endMessageDisplay && endMessageDisplay.checked) { endMessage.classList.toggle('d-none', false); + labelEndMessageButton.classList.toggle('d-none', false); } - + // Toggle on change document.getElementById('labelEndMessage').addEventListener('change', function() { endMessage.classList.toggle('d-none'); + labelEndMessageButton.classList.toggle('d-none'); }); }); \ No newline at end of file diff --git a/webapp/WEB-INF/templates/admin/plugins/forms/forms_commons.html b/webapp/WEB-INF/templates/admin/plugins/forms/forms_commons.html index 3fe0c2ddd..2e6db592f 100644 --- a/webapp/WEB-INF/templates/admin/plugins/forms/forms_commons.html +++ b/webapp/WEB-INF/templates/admin/plugins/forms/forms_commons.html @@ -527,6 +527,9 @@