|
|
|
@ -19,9 +19,7 @@
|
|
|
|
|
form.classList.add('form--sent');
|
|
|
|
|
|
|
|
|
|
// Get form data
|
|
|
|
|
// Explicitly add value of submit button (browser bug in Chrome/FF?)
|
|
|
|
|
var data = new FormData(form);
|
|
|
|
|
data.append('_submit', form._submit.value);
|
|
|
|
|
|
|
|
|
|
// Send the form data via AJAX
|
|
|
|
|
var options = {
|
|
|
|
@ -61,7 +59,7 @@
|
|
|
|
|
|
|
|
|
|
// Display the error to the user
|
|
|
|
|
form.classList.remove('form--sent');
|
|
|
|
|
form.querySelector('.form__message').innerText = err;
|
|
|
|
|
form.querySelector('.form__message').innerHTML = err;
|
|
|
|
|
|
|
|
|
|
// Enable the submit button again
|
|
|
|
|
form._submit.disabled = false;
|
|
|
|
|