Update index.js and style.css
This commit is contained in:
parent
9ae928560e
commit
5aaac71f6b
@ -47,7 +47,8 @@ function interceptForm (formId) {
|
||||
/* Add loading text */
|
||||
const submitButton = formElem.querySelector('[type="submit"]')
|
||||
const loadingText = document.createElement('span')
|
||||
loadingText.textContent = ' Envoi en cours…'
|
||||
loadingText.classList.add(".contact-mailer-sending");
|
||||
loadingText.textContent = 'Envoi en cours…'
|
||||
submitButton.after(loadingText)
|
||||
/* XHR */
|
||||
fetch(formElem.action, {
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
.contact-mailer-message {
|
||||
border: 1px solid;
|
||||
padding: 3px;
|
||||
padding-left: 8px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 2px;
|
||||
cursor:pointer;
|
||||
}
|
||||
@ -18,6 +17,22 @@
|
||||
|
||||
.contact-mailer-message-success {
|
||||
color: white;
|
||||
background-color: #06d6a0;
|
||||
border-color: #06d6a0;
|
||||
background-color: #00B06A;
|
||||
border-color: #00B06A;
|
||||
}
|
||||
|
||||
.contact-mailer-light-message-error {
|
||||
color: #721c24;
|
||||
background-color: #f8d7da;
|
||||
border-color: #f5c6cb;
|
||||
}
|
||||
|
||||
.contact-mailer-light-message-success {
|
||||
color: #155724;
|
||||
background-color: #d4edda;
|
||||
border-color: #c3e6cb;
|
||||
}
|
||||
|
||||
.contact-mailer-sending {
|
||||
padding: 5px 10px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user