Merge branch 'master' of https://git.jean-cloud.net/adrian/contact-mailer
This commit is contained in:
commit
92d75ca8d0
@ -58,10 +58,13 @@ function jeanCloudContactFormIntercept (formId, notifier) {
|
||||
*/
|
||||
const formElem = document.getElementById(formId)
|
||||
if (!formElem) {
|
||||
console.error('You tried to intercept form id:"' + formId + '" but it was not found.')
|
||||
console.error('You tried to intercept form with id:"' + formId + '" but it was not found.')
|
||||
return
|
||||
}
|
||||
|
||||
if (!notifier)
|
||||
console.log('No notifier given, no message can be displayed')
|
||||
|
||||
/* Intercept the submit event */
|
||||
formElem.onsubmit = async (e) => {
|
||||
e.preventDefault()
|
||||
@ -91,6 +94,7 @@ function jeanCloudContactFormIntercept (formId, notifier) {
|
||||
})
|
||||
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
loadingText.parentNode.removeChild(loadingText)
|
||||
notifier.error('Impossible d’envoyer le formulaire. Vérifiez votre connexion internet ou réessayez plus tard.')
|
||||
})
|
||||
@ -107,7 +111,7 @@ function jeanCloudContactFormIntercept (formId, notifier) {
|
||||
link.rel = "stylesheet";
|
||||
link.crossOrigin = 'anonymous';
|
||||
link.href = path + "/style.css";
|
||||
link.integrity = 'sha384-8PWvFCRowSxssUyiGirvpq/Nh6TTzYrsbAmpC0cw/OUKkZibNdI5L1gFiHxfrTZT'
|
||||
link.integrity = 'sha384-WJutysMMrOQpV0KGvocEEo29oFWTmU2iw0ZSgPqi53R8YElWq3qnSLd2vRCXAhjz'
|
||||
// cat style.css | openssl dgst -sha384 -binary | openssl base64 -A
|
||||
document.head.appendChild(link);
|
||||
})()
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jean-cloud-contact-mailer-client",
|
||||
"version": "1.0.16",
|
||||
"version": "1.1.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user