From a28212059e0d6bdfa257673fd451c627ae7d21ca Mon Sep 17 00:00:00 2001 From: George Cordalis <8468312+gcordalis@users.noreply.github.com> Date: Thu, 31 Jul 2025 08:18:42 +1200 Subject: [PATCH 1/2] refactor: remove redundant file button click handler in app.js fix(index.html): update form action to point to correct endpoint /submit-encrypted-data this resolves the form submission regression in the UI update --- static/js/app.js | 10 ---------- templates/index.html | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 63a00af..7edf3ac 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -151,16 +151,6 @@ document.addEventListener('DOMContentLoaded', function() { // Trigger change event on page load to set initial state recipient.dispatchEvent(new Event('change')); - // Redirect clicks on a greed button - const addFileButton = document.getElementById('add-file-button'); - addFileButton.addEventListener('click', (event) => { - // Get a reference to the file input element used by Dropzone.js - var fileInput = document.querySelector(".dz-hidden-input"); - - // Simulate a click event on the file input element - fileInput.click(); - }); - // Multi file upload meets encryption document.forms[0].addEventListener("submit", function(evt) { evt.preventDefault(); diff --git a/templates/index.html b/templates/index.html index 6b9cdd6..f7509db 100644 --- a/templates/index.html +++ b/templates/index.html @@ -10,7 +10,7 @@ {% endblock %} {% block body %} {% if notice %}
{{ notice }}
{% endif %} -