]>
Commit | Line | Data |
---|---|---|
6c137003 DM |
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 | }, | |
c87d46fb | 15 | |
6c137003 DM |
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]': { | |
c87d46fb TL |
27 | change: 'changeProfile', |
28 | }, | |
29 | }, | |
6c137003 DM |
30 | }, |
31 | ||
32 | items: [ | |
33 | { | |
34 | xtype: 'pmgLDAPProfileSelector', | |
35 | name: 'profile', | |
36 | reference: 'profileField', | |
c87d46fb | 37 | fieldLabel: gettext("Profile"), |
6c137003 DM |
38 | }, |
39 | { | |
40 | xtype: 'pmgLDAPUserSelector', | |
41 | name: 'account', | |
42 | reference: 'accountField', | |
c87d46fb TL |
43 | fieldLabel: gettext("Account"), |
44 | }, | |
45 | ], | |
6c137003 DM |
46 | }); |
47 | ||
48 | Ext.define('PMG.LDAPUserEditor', { | |
49 | extend: 'Proxmox.window.Edit', | |
50 | alias: 'widget.pmgLDAPUserEditor', | |
573a6e8b | 51 | onlineHelp: 'pmgconfig_ldap', |
6c137003 DM |
52 | |
53 | width: 500, | |
54 | ||
c87d46fb | 55 | items: [{ xtype: 'pmgLDAPUserInputPanel' }], |
6c137003 | 56 | }); |