[pve-devel] [PATCH manager 2/2] js: dc/UserEdit.js: fix indentation

Dominik Csapak d.csapak at proxmox.com
Fri Sep 14 15:40:22 CEST 2018


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/dc/UserEdit.js | 102 ++++++++++++++++++++++----------------------
 1 file changed, 51 insertions(+), 51 deletions(-)

diff --git a/www/manager6/dc/UserEdit.js b/www/manager6/dc/UserEdit.js
index 8077030a..8b7e5461 100644
--- a/www/manager6/dc/UserEdit.js
+++ b/www/manager6/dc/UserEdit.js
@@ -5,21 +5,21 @@ Ext.define('PVE.dc.UserEdit', {
     isAdd: true,
 
     initComponent : function() {
-        var me = this;
+	var me = this;
 
-        me.isCreate = !me.userid;
+	me.isCreate = !me.userid;
 
-        var url;
-        var method;
-        var realm;
+	var url;
+	var method;
+	var realm;
 
-        if (me.isCreate) {
-            url = '/api2/extjs/access/users';
-            method = 'POST';
-        } else {
+	if (me.isCreate) {
+	    url = '/api2/extjs/access/users';
+	    method = 'POST';
+	} else {
 	    url = '/api2/extjs/access/users/' + encodeURI(me.userid);
 	    url = url.replace(/#/g, '%23');
-            method = 'PUT';
+	    method = 'PUT';
 	}
 
 	var verifypw;
@@ -67,15 +67,15 @@ Ext.define('PVE.dc.UserEdit', {
 
 	};
 
-        var column1 = [
-            {
-                xtype: me.isCreate ? 'textfield' : 'displayfield',
-                name: 'userid',
-                fieldLabel: gettext('User name'),
-                value: me.userid,
-                allowBlank: false,
-                submitValue: me.isCreate ? true : false
-            },
+	var column1 = [
+	    {
+		xtype: me.isCreate ? 'textfield' : 'displayfield',
+		name: 'userid',
+		fieldLabel: gettext('User name'),
+		value: me.userid,
+		allowBlank: false,
+		submitValue: me.isCreate ? true : false
+	    },
 	    pwfield, verifypw,
 	    {
 		xtype: 'pveGroupSelector',
@@ -84,14 +84,14 @@ Ext.define('PVE.dc.UserEdit', {
 		allowBlank: true,
 		fieldLabel: gettext('Group')
 	    },
-            {
-                xtype: 'datefield',
-                name: 'expire',
+	    {
+		xtype: 'datefield',
+		name: 'expire',
 		emptyText: 'never',
 		format: 'Y-m-d',
 		submitFormat: 'U',
-                fieldLabel: gettext('Expire')
-            },
+		fieldLabel: gettext('Expire')
+	    },
 	    {
 		xtype: 'proxmoxcheckbox',
 		fieldLabel: gettext('Enabled'),
@@ -100,9 +100,9 @@ Ext.define('PVE.dc.UserEdit', {
 		defaultValue: 1,
 		checked: true
 	    }
-        ];
+	];
 
-        var column2 = [
+	var column2 = [
 	    {
 		xtype: 'textfield',
 		name: 'firstname',
@@ -133,24 +133,24 @@ Ext.define('PVE.dc.UserEdit', {
 		fieldLabel: gettext('Key IDs')
 	    }
 	];
- 
-        if (me.isCreate) {
-            column1.splice(1,0,{
-                xtype: 'pveRealmComboBox',
-                name: 'realm',
-                fieldLabel: gettext('Realm'),
-                allowBlank: false,
+
+	if (me.isCreate) {
+	    column1.splice(1,0,{
+		xtype: 'pveRealmComboBox',
+		name: 'realm',
+		fieldLabel: gettext('Realm'),
+		allowBlank: false,
 		matchFieldWidth: false,
 		listConfig: { width: 300 },
-                listeners: {
-                    change: function(combo, newValue){
-                        realm = newValue;
+		listeners: {
+		    change: function(combo, newValue){
+			realm = newValue;
 			update_passwd_field(realm);
-                    }
-                },
-                submitValue: false
-            });
-        }
+		    }
+		},
+		submitValue: false
+	    });
+	}
 
 	var ipanel = Ext.create('Proxmox.panel.InputPanel', {
 	    column1: column1,
@@ -175,19 +175,19 @@ Ext.define('PVE.dc.UserEdit', {
 	});
 
 	Ext.applyIf(me, {
-            subject: gettext('User'),
-            url: url,
-            method: method,
+	    subject: gettext('User'),
+	    url: url,
+	    method: method,
 	    fieldDefaults: {
 		labelWidth: 110 // for spanish translation 
 	    },
 	    items: [ ipanel ]
-        });
+	});
 
-        me.callParent();
+	me.callParent();
 
-        if (!me.isCreate) {
-            me.load({
+	if (!me.isCreate) {
+	    me.load({
 		success: function(response, options) {
 		    var data = response.result.data;
 		    if (Ext.isDefined(data.expire)) {
@@ -199,8 +199,8 @@ Ext.define('PVE.dc.UserEdit', {
 			}
 		    }
 		    me.setValues(data);
-                }
-            });
-        }
+		}
+	    });
+	}
     }
 });
-- 
2.11.0





More information about the pve-devel mailing list