From 785d000e28cd1eb33e41256e231819fdc602ba7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 12 Feb 2016 16:11:56 +0100 Subject: [PATCH] Feature #4317: Use utils/user-inputs in provision-tab --- src/sunstone/public/app/tabs/provision-tab.js | 143 ++---------------- 1 file changed, 14 insertions(+), 129 deletions(-) diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js index c4d0eced97..cc8bbbc3eb 100644 --- a/src/sunstone/public/app/tabs/provision-tab.js +++ b/src/sunstone/public/app/tabs/provision-tab.js @@ -35,6 +35,8 @@ define(function(require) { var NicsSection = require('utils/nics-section'); var TemplateUtils = require('utils/template-utils'); var LabelsUtils = require('utils/labels/utils'); + var WizardFields = require('utils/wizard-fields'); + var UserInputs = require('utils/user-inputs'); var ProvisionQuotaWidget = require('./provision-tab/users/quota-widget'); @@ -127,83 +129,6 @@ define(function(require) { $(document).foundation(); - function generate_custom_attrs(context, custom_attrs) { - context.off(); - var text_attrs = []; - - $.each(custom_attrs, function(key, value){ - var parts = value.split("|"); - // 0 mandatory; 1 type; 2 desc; - var attrs = { - "name": key, - "mandatory": parts[0], - "type": parts[1], - "description": parts[2], - } - - switch (parts[1]) { - case "text": - case "text64": - case "password": - text_attrs.push(attrs) - break; - } - }); - - if (text_attrs.length > 0) { - context.html( - '
'+ - '
'+ - '
'+ - '

'+ - ''+ - ' '+ - Locale.tr("Custom Attributes")+ - ''+ - '

'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'); - - - $.each(text_attrs, function(index, custom_attr){ - var input; - - switch (custom_attr.type) { - case "text": - input = '