21 lines
520 B
JavaScript
21 lines
520 B
JavaScript
(() => {
|
|
'use strict'
|
|
|
|
const form = document.querySelector('#agendaForm');
|
|
if (form) {
|
|
form.addEventListener('submit', event => {
|
|
if (!form.checkValidity()) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
}
|
|
form.classList.add('was-validated');
|
|
}, false);
|
|
}
|
|
|
|
const toastEl = document.querySelector('.toast');
|
|
if (toastEl) {
|
|
const toast = new bootstrap.Toast(toastEl);
|
|
toast.show();
|
|
}
|
|
})();
|