pmg-gui/js/LDAPUserEditor.js
Dominik Csapak ea07c9aa8e jslint: type confusion
fix many type confusions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-09-28 14:42:13 +02:00

56 lines
1.1 KiB
JavaScript

Ext.define('PMG.LDAPUserInputPanel', {
extend: 'Proxmox.panel.InputPanel',
alias: 'widget.pmgLDAPUserInputPanel',
setValues: function(values) {
var me = this;
if (values.profile !== undefined) {
var accountField = this.lookupReference('accountField');
accountField.setProfile(values.profile);
}
me.callParent([values]);
},
controller: {
xclass: 'Ext.app.ViewController',
changeProfile: function(f, value) {
var accountField = this.lookupReference('accountField');
accountField.setProfile(value);
},
control: {
'field[name=profile]': {
change: 'changeProfile'
}
}
},
items: [
{
xtype: 'pmgLDAPProfileSelector',
name: 'profile',
reference: 'profileField',
fieldLabel: gettext("Profile")
},
{
xtype: 'pmgLDAPUserSelector',
name: 'account',
reference: 'accountField',
fieldLabel: gettext("Account")
}
]
});
Ext.define('PMG.LDAPUserEditor', {
extend: 'Proxmox.window.Edit',
alias: 'widget.pmgLDAPUserEditor',
width: 500,
items: [{ xtype: 'pmgLDAPUserInputPanel' }]
});