diff --git a/Website/js/script.js b/Website/js/script.js new file mode 100755 index 0000000..5739c6a --- /dev/null +++ b/Website/js/script.js @@ -0,0 +1,21 @@ +// Example starter JavaScript for disabling form submissions if there are invalid fields +(() => { + 'use strict' + + // Fetch all the forms we want to apply custom Bootstrap validation styles to + const forms = document.querySelectorAll('.needs-validation') + + // Loop over them and prevent submission + Array.from(forms).forEach(form => { + form.addEventListener('submit', event => { + if (!form.checkValidity()) { + event.preventDefault() + event.stopPropagation() + } + form.classList.add('was-validated') + }, false) + }) + +})() + + diff --git a/Website/vues/Ajout.php b/Website/vues/Ajout.php old mode 100644 new mode 100755 index b0f1706..c6a9b95 --- a/Website/vues/Ajout.php +++ b/Website/vues/Ajout.php @@ -7,6 +7,7 @@