mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #3703 from node-red-hitachi/fix-subflow-credential-input
Fix credential type input item of subflow template
This commit is contained in:
		@@ -41,8 +41,12 @@ RED.editor.envVarList = (function() {
 | 
			
		||||
                        style: "width:100%",
 | 
			
		||||
                        class: "node-input-env-value",
 | 
			
		||||
                        type: "text",
 | 
			
		||||
                    }).attr("autocomplete","disable").appendTo(envRow)
 | 
			
		||||
                    valueField.typedInput({default:'str',types:isTemplateNode?DEFAULT_ENV_TYPE_LIST:DEFAULT_ENV_TYPE_LIST_INC_CRED});
 | 
			
		||||
                    }).attr("autocomplete","disable").appendTo(envRow);
 | 
			
		||||
                    var types = (opt.ui && opt.ui.opts && opt.ui.opts.types);
 | 
			
		||||
                    if (!types) {
 | 
			
		||||
                        types = isTemplateNode ? DEFAULT_ENV_TYPE_LIST : DEFAULT_ENV_TYPE_LIST_INC_CRED;
 | 
			
		||||
                    }
 | 
			
		||||
                    valueField.typedInput({default:'str',types:types});
 | 
			
		||||
                    valueField.typedInput('type', opt.type);
 | 
			
		||||
                    if (opt.type === "cred") {
 | 
			
		||||
                        if (opt.value) {
 | 
			
		||||
@@ -94,6 +98,11 @@ RED.editor.envVarList = (function() {
 | 
			
		||||
                        }
 | 
			
		||||
                        opt.ui.label = opt.ui.label || {};
 | 
			
		||||
                        opt.ui.type = opt.ui.type || "input";
 | 
			
		||||
                        if ((opt.ui.type === "cred") &&
 | 
			
		||||
                            opt.ui.opts &&
 | 
			
		||||
                            opt.ui.opts.types) {
 | 
			
		||||
                            opt.ui.type = "input";
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        var uiRow = $('<div/>').appendTo(container).hide();
 | 
			
		||||
                        // save current info for reverting on cancel
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user