From 51c9973c0dee8e8e2ceaf9a682d6119766a7c7c0 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Thu, 1 May 2025 08:54:26 +0200 Subject: [PATCH] make write permission check case insensitive --- client/jsFiles/SEAWebClientMain.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/jsFiles/SEAWebClientMain.js b/client/jsFiles/SEAWebClientMain.js index a03c46e..7e53470 100644 --- a/client/jsFiles/SEAWebClientMain.js +++ b/client/jsFiles/SEAWebClientMain.js @@ -188,13 +188,10 @@ window.onload = function() { let array_button = document.getElementsByClassName('input-element-button'); if (writePermission == false) { - // TODO: here instead of asking "Please confirm we are on ", do not show the instrument, - // ask the user "Please confrim the instrument:" and check it the entered instrument is correct - // (case insensitive) - alertify.prompt( "WRITE PERMISSION", "Current device: "+ window.device + "

Please confirm the instrument:", "" + alertify.prompt( "WRITE PERMISSION", "Current device: "+ window.device + "

Please confirm the instrument:", "" , function(evt, value) { // User decided to proceed - if (window.instrument === value) { + if (window.instrument.toUpperCase() === value.toUpperCase()) { writePermission = true; icon_lock_container.innerHTML = ''; for(i = 0; i < array_icon_edit.length; i++) {