Change credential boolean prefix

This commit is contained in:
Nick O'Leary 2014-07-20 20:42:41 +01:00
parent d67a54a66a
commit 4302deb5a6
3 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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;
}

View File

@ -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;
}