make write permission check case insensitive
This commit is contained in:
@ -188,13 +188,10 @@ window.onload = function() {
|
|||||||
let array_button = document.getElementsByClassName('input-element-button');
|
let array_button = document.getElementsByClassName('input-element-button');
|
||||||
|
|
||||||
if (writePermission == false) {
|
if (writePermission == false) {
|
||||||
// TODO: here instead of asking "Please confirm we are on <instrument>", do not show the instrument,
|
alertify.prompt( "WRITE PERMISSION", "Current device: <b>"+ window.device + "</b><p>Please confirm 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: <b>"+ window.device + "</br></br>Please confirm the instrument:", ""
|
|
||||||
, function(evt, value) {
|
, function(evt, value) {
|
||||||
// User decided to proceed
|
// User decided to proceed
|
||||||
if (window.instrument === value) {
|
if (window.instrument.toUpperCase() === value.toUpperCase()) {
|
||||||
writePermission = true;
|
writePermission = true;
|
||||||
icon_lock_container.innerHTML = '<img class = "icon-main icon-lock" src="res/icon_lock_open.png">';
|
icon_lock_container.innerHTML = '<img class = "icon-main icon-lock" src="res/icon_lock_open.png">';
|
||||||
for(i = 0; i < array_icon_edit.length; i++) {
|
for(i = 0; i < array_icon_edit.length; i++) {
|
||||||
|
Reference in New Issue
Block a user