From 4302deb5a6a80da469090e43dc538c4458e6a165 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 20 Jul 2014 20:42:41 +0100 Subject: [PATCH] Change credential boolean prefix --- nodes/core/io/21-httpin.html | 2 +- public/red/ui/editor.js | 4 ++-- red/nodes/credentials.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nodes/core/io/21-httpin.html b/nodes/core/io/21-httpin.html index a574fcfc7..a8c653c28 100644 --- a/nodes/core/io/21-httpin.html +++ b/nodes/core/io/21-httpin.html @@ -221,7 +221,7 @@ return this.name?"node_label_italic":""; }, oneditprepare: function() { - if (this.credentials.user || this.credentials.haspassword) { + if (this.credentials.user || this.credentials.has_password) { $('#node-input-useAuth').prop('checked', true); $(".node-input-useAuth-row").show(); } else { diff --git a/public/red/ui/editor.js b/public/red/ui/editor.js index 6e3441e30..aaa776d03 100644 --- a/public/red/ui/editor.js +++ b/public/red/ui/editor.js @@ -348,7 +348,7 @@ RED.editor = function() { if (credDef[cred].type == 'password') { if (credData[cred]) { $('#' + prefix + '-' + cred).val(credData[cred]); - } else if (credData['has' + cred]) { + } else if (credData['has_' + cred]) { $('#' + prefix + '-' + cred).val('__PWRD__'); } else { @@ -385,7 +385,7 @@ RED.editor = function() { var input = $("#" + prefix + '-' + cred); var value = input.val(); if (credDefinition[cred].type == 'password') { - node.credentials['has' + cred] = (value != ""); + node.credentials['has_' + cred] = (value != ""); if (value == '__PWRD__') { continue; } diff --git a/red/nodes/credentials.js b/red/nodes/credentials.js index b5bfe6400..219c23916 100644 --- a/red/nodes/credentials.js +++ b/red/nodes/credentials.js @@ -49,7 +49,7 @@ function restGET(type) { for (var cred in definition) { if (definition.hasOwnProperty(cred)) { if (definition[cred].type == "password") { - var key = 'has' + cred; + var key = 'has_' + cred; sendCredentials[key] = credentials[cred] != null && credentials[cred] !== ''; continue; }