From 8cb498b8217ba26d633d30d0866cf46bfcb5bfb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 30 Oct 2015 10:57:41 +0100 Subject: [PATCH] Feature #4082: New user input type in sunstone, text64 (cherry picked from commit c7e76eebdf86f37d50445fe00f9bcef600eb1685) --- .../form-panels/create/wizard-tabs/context.js | 1 + src/sunstone/public/app/utils/user-inputs.js | 37 +++++++++++++------ .../public/app/utils/wizard-fields.js | 8 +++- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js index e6b8ad109c..3b38b13a43 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js @@ -171,6 +171,7 @@ define(function(require) { '' + '' + '' + diff --git a/src/sunstone/public/app/utils/user-inputs.js b/src/sunstone/public/app/utils/user-inputs.js index aa10831f98..30ec84b2ed 100644 --- a/src/sunstone/public/app/utils/user-inputs.js +++ b/src/sunstone/public/app/utils/user-inputs.js @@ -87,8 +87,7 @@ define(function(require) { network_attrs.push(attrs) break; case "text": - text_attrs.push(attrs) - break; + case "text64": case "password": text_attrs.push(attrs) break; @@ -154,16 +153,30 @@ define(function(require) { div.append('
'); $.each(text_attrs, function(index, custom_attr) { - $(".instantiate_user_inputs", div).append( - '
' + - '
' + - '' + - '
' + - '
'); - }); + var input; + + switch (custom_attr.type) { + case "text": + input = '