From 716a609f4ec09fbf683d7d71db300821466a03b5 Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Sat, 26 Sep 2026 12:43:20 +0200 Subject: [PATCH] Hide form parts with the hidden attribute. --- publish/utilities.js | 12 ++++++------ publish/write.inc.php | 8 ++++---- style.css | 5 +++++ tests/js/helpers.js | 4 ++-- tests/js/utilities.test.js | 6 ++---- tests/php/Pages/SubmitTest.php | 8 ++++++++ 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/publish/utilities.js b/publish/utilities.js index 4a07378..0667166 100644 --- a/publish/utilities.js +++ b/publish/utilities.js @@ -8,15 +8,15 @@ function showHide(show) { } if (show == 'text') { - document.getElementById(hide+'parent').style.display = "none"; - document.getElementById(show+'parent').style.display = "block"; - document.getElementById('wordcounter').style.display = "block"; + document.getElementById(hide+'parent').hidden = true; + document.getElementById(show+'parent').hidden = false; + document.getElementById('wordcounter').hidden = false; if (window.storyEditor) storyEditor.focus(); } else if (show == 'upload') { - document.getElementById('wordcounter').style.display = "none"; - document.getElementById(hide+'parent').style.display = "none"; - document.getElementById(show+'parent').style.display = "block"; + document.getElementById('wordcounter').hidden = true; + document.getElementById(hide+'parent').hidden = true; + document.getElementById(show+'parent').hidden = false; } // Mark the tab that is showing diff --git a/publish/write.inc.php b/publish/write.inc.php index d0cb1f0..b725bad 100644 --- a/publish/write.inc.php +++ b/publish/write.inc.php @@ -48,7 +48,7 @@ if (count($validate) !== 0) {
Text: Image: - +
@@ -58,7 +58,7 @@ echo (isset($story) ? form_value($story) : '') ?>
-