]>
Commit | Line | Data |
---|---|---|
8f30708d DC |
1 | Ext.define('Proxmox.panel.OpenIDInputPanel', { |
2 | extend: 'Proxmox.panel.InputPanel', | |
3 | xtype: 'pmxAuthOpenIDPanel', | |
4 | mixins: ['Proxmox.Mixin.CBind'], | |
5 | ||
6 | type: 'openid', | |
7 | ||
8 | onGetValues: function(values) { | |
9 | let me = this; | |
10 | ||
11 | if (me.isCreate) { | |
12 | values.type = me.type; | |
13 | } | |
14 | ||
15 | return values; | |
16 | }, | |
17 | ||
18 | columnT: [ | |
19 | { | |
20 | xtype: 'textfield', | |
21 | name: 'issuer-url', | |
22 | fieldLabel: gettext('Issuer URL'), | |
23 | allowBlank: false, | |
24 | }, | |
25 | ], | |
26 | ||
27 | column1: [ | |
28 | { | |
29 | xtype: 'pmxDisplayEditField', | |
30 | name: 'realm', | |
31 | cbind: { | |
32 | value: '{realm}', | |
33 | editable: '{isCreate}', | |
34 | }, | |
35 | fieldLabel: gettext('Realm'), | |
36 | allowBlank: false, | |
37 | }, | |
38 | { | |
39 | xtype: 'proxmoxtextfield', | |
40 | fieldLabel: gettext('Client ID'), | |
41 | name: 'client-id', | |
42 | allowBlank: false, | |
43 | }, | |
44 | { | |
45 | xtype: 'proxmoxtextfield', | |
46 | fieldLabel: gettext('Client Key'), | |
47 | cbind: { | |
48 | deleteEmpty: '{!isCreate}', | |
49 | }, | |
50 | name: 'client-key', | |
51 | }, | |
52 | ], | |
53 | ||
54 | column2: [ | |
55 | { | |
56 | xtype: 'proxmoxcheckbox', | |
57 | fieldLabel: gettext('Autocreate Users'), | |
58 | name: 'autocreate', | |
59 | value: 0, | |
60 | cbind: { | |
61 | deleteEmpty: '{!isCreate}', | |
62 | }, | |
63 | }, | |
64 | { | |
65 | xtype: 'pmxDisplayEditField', | |
66 | name: 'username-claim', | |
c860b349 | 67 | fieldLabel: gettext('Username Claim'), |
8f30708d DC |
68 | editConfig: { |
69 | xtype: 'proxmoxKVComboBox', | |
c860b349 TL |
70 | editable: true, |
71 | comboItems: [ | |
72 | ['__default__', Proxmox.Utils.defaultText], | |
73 | ['subject', 'subject'], | |
74 | ['username', 'username'], | |
75 | ['email', 'email'], | |
76 | ], | |
8f30708d DC |
77 | }, |
78 | cbind: { | |
79 | value: get => get('isCreate') ? '__default__' : Proxmox.Utils.defaultText, | |
80 | deleteEmpty: '{!isCreate}', | |
81 | editable: '{isCreate}', | |
82 | }, | |
8f30708d | 83 | }, |
0dce277c TL |
84 | { |
85 | xtype: 'proxmoxtextfield', | |
86 | name: 'scopes', | |
87 | fieldLabel: gettext('Scopes'), | |
88 | emptyText: `${Proxmox.Utils.defaultText} (email profile)`, | |
89 | submitEmpty: false, | |
90 | cbind: { | |
91 | deleteEmpty: '{!isCreate}', | |
92 | }, | |
93 | }, | |
5c5cee2d TL |
94 | { |
95 | xtype: 'proxmoxKVComboBox', | |
96 | name: 'prompt', | |
97 | fieldLabel: gettext('Prompt'), | |
98 | editable: true, | |
99 | emptyText: gettext('Auth-Provider Default'), | |
100 | comboItems: [ | |
101 | ['__default__', gettext('Auth-Provider Default')], | |
102 | ['none', 'none'], | |
103 | ['login', 'login'], | |
104 | ['consent', 'consent'], | |
105 | ['select_account', 'select_account'], | |
106 | ], | |
107 | cbind: { | |
108 | deleteEmpty: '{!isCreate}', | |
109 | }, | |
110 | }, | |
8f30708d DC |
111 | ], |
112 | ||
113 | columnB: [ | |
114 | { | |
115 | xtype: 'textfield', | |
116 | name: 'comment', | |
117 | fieldLabel: gettext('Comment'), | |
118 | cbind: { | |
119 | deleteEmpty: '{!isCreate}', | |
120 | }, | |
121 | }, | |
122 | ], | |
ec12ffb9 TL |
123 | |
124 | advancedColumnB: [ | |
125 | { | |
126 | xtype: 'proxmoxtextfield', | |
127 | name: 'acr-values', | |
128 | fieldLabel: gettext('ACR Values'), | |
129 | submitEmpty: false, | |
130 | cbind: { | |
131 | deleteEmpty: '{!isCreate}', | |
132 | }, | |
133 | }, | |
134 | ], | |
8f30708d DC |
135 | }); |
136 |