[pve-devel] [PATCH manager 4/7] ext6migrate: fix User and Role selector

Dominik Csapak d.csapak at proxmox.com
Tue Mar 8 11:03:54 CET 2016


we have to move the static fields to the class
configuration, otherwise the combobox does not work

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/RoleSelector.js | 8 ++++----
 www/manager6/form/UserSelector.js | 9 ++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/www/manager6/form/RoleSelector.js b/www/manager6/form/RoleSelector.js
index 7ffcad2..b9e7883 100644
--- a/www/manager6/form/RoleSelector.js
+++ b/www/manager6/form/RoleSelector.js
@@ -2,6 +2,10 @@ Ext.define('PVE.form.RoleSelector', {
     extend: 'PVE.form.ComboGrid',
     alias: ['widget.pveRoleSelector'],
 
+    allowBlank: false,
+    autoSelect: false,
+    valueField: 'roleid',
+    displayField: 'roleid',
     initComponent: function() {
 	var me = this;
 
@@ -11,10 +15,6 @@ Ext.define('PVE.form.RoleSelector', {
 
 	Ext.apply(me, {
 	    store: store,
-	    allowBlank: false,
-	    autoSelect: false,
-	    valueField: 'roleid',
-	    displayField: 'roleid',
             listConfig: {
 		columns: [
 		    {
diff --git a/www/manager6/form/UserSelector.js b/www/manager6/form/UserSelector.js
index f82431c..0ab7646 100644
--- a/www/manager6/form/UserSelector.js
+++ b/www/manager6/form/UserSelector.js
@@ -1,7 +1,10 @@
 Ext.define('PVE.form.UserSelector', {
     extend: 'PVE.form.ComboGrid',
     alias: ['widget.pveUserSelector'],
-
+    allowBlank: false,
+    autoSelect: false,
+    valueField: 'userid',
+    displayField: 'userid',
     initComponent: function() {
 	var me = this;
 
@@ -18,10 +21,6 @@ Ext.define('PVE.form.UserSelector', {
 
 	Ext.apply(me, {
 	    store: store,
-	    allowBlank: false,
-	    autoSelect: false,
-	    valueField: 'userid',
-	    displayField: 'userid',
             listConfig: {
 		columns: [
 		    {
-- 
2.1.4





More information about the pve-devel mailing list