diff --git a/index.php b/index.php index 63ae10e..5f57e8c 100644 --- a/index.php +++ b/index.php @@ -336,13 +336,12 @@ if (!$isConfig and $hasSupplier) {
-
-
-
- -
+
+ +
@@ -356,7 +355,7 @@ if (!$isConfig and $hasSupplier) { / - +
@@ -592,7 +591,7 @@ if (!$isConfig and $hasSupplier) { }); }); - fields.forEach(function (field) { + fields.forEach(function (field) {e if ( (form.elements[field].value === '') && (window.localStorage.getItem('mon_panier_bio_' + field) !== null) @@ -601,6 +600,16 @@ if (!$isConfig and $hasSupplier) { } }); }); + document.querySelectorAll('.js-closealerts').forEach(function (element) { + element.addEventListener('input', function (event) { + if (event.target.value !== '') { + document.querySelectorAll('.alert').forEach(function (alertElement) { + var alert = bootstrap.Alert.getOrCreateInstance(alertElement) + alert.close(); + }); + } + }); + });