From 56260255035a3c57673d7f168c5ff6457b55079c Mon Sep 17 00:00:00 2001 From: Othmane BENJELLOUN Date: Mon, 10 Jun 2024 15:19:45 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'index.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 9a54bee..c1c88c1 100644 --- a/index.html +++ b/index.html @@ -799,13 +799,20 @@ }; // Envoyer l'e-mail - emailjs.send('service_miwbldn', 'template_vi7w5fd', templateParams) + emailjs.send('service_ABC123', 'template_XYZ456', templateParams) .then(function(response) { console.log('SUCCESS!', response.status, response.text); document.getElementById('status').innerText = 'Message envoyé avec succès!'; + document.getElementById('status').style.color = 'green'; + + // Effacer le formulaire + document.querySelector('input[name="fullname"]').value = ''; + document.querySelector('input[name="email"]').value = ''; + document.querySelector('textarea[name="message"]').value = ''; }, function(error) { console.log('FAILED...', error); document.getElementById('status').innerText = 'Erreur lors de l\'envoi du message.'; + document.getElementById('status').style.color = 'red'; }); });