From 3a0a6359231277dffa7b85df08bf5e80d0e0464b Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Thu, 27 Aug 2020 16:20:02 +0200 Subject: [PATCH] v1 --- client/index.js | 8 ++++++-- client/package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/index.js b/client/index.js index 85fa038..1130fa5 100644 --- a/client/index.js +++ b/client/index.js @@ -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); })() diff --git a/client/package.json b/client/package.json index f6493c8..647cbec 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "jean-cloud-contact-mailer-client", - "version": "1.0.16", + "version": "1.1.2", "description": "", "main": "index.js", "scripts": {