From ac6ea8dc4da8be20f69088ee71f32b05339c910c Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Thu, 23 Apr 2020 18:01:31 -0400 Subject: added temporary flip cards, ran through htmlhint and prettier --- src/js/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/js') diff --git a/src/js/index.js b/src/js/index.js index 0697b51..77cdf65 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -29,7 +29,7 @@ const disableSuccessBox = function() { } const enableErrorBox = function(message) { - let errorBox = document.getElementById("errorBox"); + const errorBox = document.getElementById("errorBox"); let aTag = document.createElement('a'); aTag.setAttribute("href", "mailto:amy@carpentertutoring.com"); aTag.innerText = message + " Click here to send through your mail client."; @@ -48,10 +48,10 @@ const enableSuccessBox = function() { document.forms.inquiry.onsubmit = function() { disableErrorBox(); disableSuccessBox(); - let form = document.forms.inquiry; - let name = form.elements.name.value; - let fromEmail = form.elements.from.value; - let body = form.elements.body.value; + const form = document.forms.inquiry; + const name = form.elements.name.value; + const fromEmail = form.elements.from.value; + const body = form.elements.body.value; Email.send({ SecureToken : "cec9bc04-de48-48fd-b1ad-a95cffb41468", @@ -59,7 +59,7 @@ document.forms.inquiry.onsubmit = function() { From : fromEmail, Subject : "Inquiry: " + name, Body : body, - }).then( message => { + }).then(message => { if (message == "OK") { form.reset(); enableSuccessBox(); -- cgit v1.2.3