UserEdit.js: use dynamic xtype with cbind

This commit is contained in:
Dietmar Maurer 2017-03-31 12:29:54 +02:00
parent 2f74c5b4a5
commit b4ca6e3aa4

View File

@ -23,6 +23,7 @@ Ext.define('PMG.UserEdit', {
me.autoLoad = userid ? true : false; me.autoLoad = userid ? true : false;
return { return {
useridXType: userid ? 'displayfield' : 'textfield',
isSuperUser: userid === 'root@pam', isSuperUser: userid === 'root@pam',
} }
}, },
@ -37,7 +38,7 @@ Ext.define('PMG.UserEdit', {
allowBlank: false, allowBlank: false,
cbind: { cbind: {
submitValue: '{create}', submitValue: '{create}',
editable: '{create}' xtype: '{useridXType}',
} }
}, },
{ {