From 71c90eed43ddf3b42af7aef81e77e6c883706f16 Mon Sep 17 00:00:00 2001 From: TehPeGaSuS <25697531+TehPeGaSuS@users.noreply.github.com> Date: Fri, 16 Oct 2026 12:36:00 +0200 Subject: [PATCH] Disable the send button instead of hiding it for forbidden extensions --- lib/functions.js.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/functions.js.php b/lib/functions.js.php index b178f4f..656108b 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -346,6 +346,7 @@ function control_selected_file_size(max_size, error_str) // display options document.getElementById('options').style.display = 'block'; document.getElementById('send').style.display = 'block'; + document.getElementById('send').disabled = false; document.getElementById('error_pop').style.display = 'none'; document.getElementById('send').focus(); } @@ -360,7 +361,9 @@ function control_selected_file_extension(disallowed_extensions, error_str) if (disallowed_extensions.includes(f_ext)) { pop_failure(error_str); - document.getElementById('send').style.display = 'none'; + // keep the button visible but disabled so the user sees it is forbidden + document.getElementById('send').style.display = 'block'; + document.getElementById('send').disabled = true; } } -- 2.43.0