From b1da57be5392863bd084d953ad1d4c86013d591b Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Mon, 8 Apr 2024 10:35:16 +0100 Subject: [PATCH] Toggle show/hide advanced options button text Signed-off-by: William Vinnicombe --- web/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/main.js b/web/main.js index 1bbfe57..1e7b5ee 100644 --- a/web/main.js +++ b/web/main.js @@ -534,6 +534,12 @@ var isPicoWireless = false; for (let i = 0; i < advancedOptions2.length; i++) { advancedOptions2[i].disabled = !advancedOptions2[i].disabled; } + let hidden = advancedOptions[0].hidden; + if (hidden) { + document.getElementById('btn-advanced-options').innerText = "Show Advanced Options"; + } else { + document.getElementById('btn-advanced-options').innerText = "Hide Advanced Options"; + } }); document.getElementById('btn-create').addEventListener('click', submitBtnClick); const selectBoardTypeElement = document.getElementById('sel-board-type');