]> git.proxmox.com Git - pmg-gui.git/blob - js/LDAPUserEditor.js
fix #5251: login: set autocomplete on password and user
[pmg-gui.git] / js / LDAPUserEditor.js
1 Ext.define('PMG.LDAPUserInputPanel', {
2 extend: 'Proxmox.panel.InputPanel',
3 alias: 'widget.pmgLDAPUserInputPanel',
4
5 setValues: function(values) {
6 var me = this;
7
8 if (values.profile !== undefined) {
9 var accountField = this.lookupReference('accountField');
10 accountField.setProfile(values.profile);
11 }
12
13 me.callParent([values]);
14 },
15
16 controller: {
17
18 xclass: 'Ext.app.ViewController',
19
20 changeProfile: function(f, value) {
21 var accountField = this.lookupReference('accountField');
22 accountField.setProfile(value);
23 },
24
25 control: {
26 'field[name=profile]': {
27 change: 'changeProfile'
28 }
29 }
30 },
31
32 items: [
33 {
34 xtype: 'pmgLDAPProfileSelector',
35 name: 'profile',
36 reference: 'profileField',
37 fieldLabel: gettext("Profile")
38 },
39 {
40 xtype: 'pmgLDAPUserSelector',
41 name: 'account',
42 reference: 'accountField',
43 fieldLabel: gettext("Account")
44 }
45 ]
46 });
47
48 Ext.define('PMG.LDAPUserEditor', {
49 extend: 'Proxmox.window.Edit',
50 alias: 'widget.pmgLDAPUserEditor',
51 onlineHelp: 'pmgconfig_ldap',
52
53 width: 500,
54
55 items: [{ xtype: 'pmgLDAPUserInputPanel' }]
56 });