From 4dfdb6ccba0db8c96ff8a6ac15d43c0addf40280 Mon Sep 17 00:00:00 2001 From: Axton Date: Fri, 24 Jun 2022 18:45:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20v1.1.10=20Minor=20Commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- Public/assets/js/formContentUpdate.js | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/LICENSE b/LICENSE index 9006be8..74546cf 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Axtonprice, QuickBlaze +Copyright (c) 2022 axtonprice, QuickBlaze Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Public/assets/js/formContentUpdate.js b/Public/assets/js/formContentUpdate.js index 2a86bef..6ae3357 100644 --- a/Public/assets/js/formContentUpdate.js +++ b/Public/assets/js/formContentUpdate.js @@ -16,8 +16,9 @@ function updateFormDisplay() { document.getElementById('submissiontextbox').innerHTML = `${window.location}view?key=${data.response}`; // Set text box to view message URL log(`Updated 'submissiontextbox.innerHTML'`); }); - setTimeout(function () { - $('#form_submission').fadeIn('fast'); log(`Now showing 'form_submission' element`); // fade in new content + setTimeout(() => { + $('#form_submission').fadeIn('fast'); // fade in new content + log(`Now showing 'form_submission' element`); }, 200); } @@ -28,11 +29,8 @@ function updateViewDisplay() { let key = new URL(window.location).searchParams.get('key'); // Get key variable from URL; replacing PHP usage log(`Got key variable from url -> ${key}`); -function updateViewDisplay() { - $('#form_confirmation').fadeOut('fast'); log(`No longer showing 'form_confirmation' element`); // fade out previous content - var key = new URL(window.location).searchParams.get("key"); log(`Got key variable from url -> ${key}`); // Get key variable from URL; replacing PHP usage fetch(`dataProcessing?action=decrypt&key=${key}`).then(response => response.json()).then(data => { - if (data.response == "") { + if (!data.response) { showSnackBar('snackbarError'); $('#form_error').fadeIn('fast'); // fade in new content log(`Now showing 'form_error' element`); @@ -50,11 +48,6 @@ function updateViewDisplay() { log(`Now showing 'form_content' element`); }, 200); log(`Server responded with '${data.response}'`); - document.getElementById("valuetextbox").value = data.response; log(`Updated 'valuetextbox.value'`); // Set text box to decrypted message - document.getElementById("valuetextbox").innerHTML = data.response; log(`Updated 'valuetextbox.innerHTML'`); // Set text box to decrypted message - setTimeout(function () { - $('#form_content').fadeIn('fast'); log(`Now showing 'form_content' element`); // fade in new content - }, 200); - } + }; }); } \ No newline at end of file