pmg-gui/js/LDAPUserEditor.js
Thomas Lamprecht c87d46fbe8 tree wide: eslint --fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 13:17:15 +02:00

57 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',
onlineHelp: 'pmgconfig_ldap',
width: 500,
items: [{ xtype: 'pmgLDAPUserInputPanel' }],
});