mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 15:58:20 +00:00
ui: tfa: make jsliunt a bit more happy
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a8740316e3
commit
34c08874de
@ -1,3 +1,4 @@
|
|||||||
|
/*jslint confusion: true*/
|
||||||
Ext.define('PVE.window.TFAEdit', {
|
Ext.define('PVE.window.TFAEdit', {
|
||||||
extend: 'Ext.window.Window',
|
extend: 'Ext.window.Window',
|
||||||
mixins: ['Proxmox.Mixin.CBind'],
|
mixins: ['Proxmox.Mixin.CBind'],
|
||||||
@ -103,7 +104,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
data: {
|
data: {
|
||||||
in_totp_tab: true,
|
in_totp_tab: true,
|
||||||
tfa_required: false,
|
tfa_required: false,
|
||||||
u2f_available: true,
|
u2f_available: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -173,10 +174,10 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
config: PVE.Parser.printPropertyString({
|
config: PVE.Parser.printPropertyString({
|
||||||
type: 'oath',
|
type: 'oath',
|
||||||
digits: values.digits,
|
digits: values.digits,
|
||||||
step: values.step,
|
step: values.step
|
||||||
}),
|
}),
|
||||||
// this is used to verify that the client generates the correct codes:
|
// this is used to verify that the client generates the correct codes:
|
||||||
response: me.lookup('challenge').value,
|
response: me.lookup('challenge').value
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Proxmox.UserName !== 'root@pam') {
|
if (Proxmox.UserName !== 'root@pam') {
|
||||||
@ -202,7 +203,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
var values = me.lookup('totp-form').getValues();
|
var values = me.lookup('totp-form').getValues();
|
||||||
var params = {
|
var params = {
|
||||||
userid: me.getView().userid,
|
userid: me.getView().userid,
|
||||||
action: 'delete',
|
action: 'delete'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Proxmox.UserName !== 'root@pam') {
|
if (Proxmox.UserName !== 'root@pam') {
|
||||||
@ -293,7 +294,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
fieldDefaults: {
|
fieldDefaults: {
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
anchor: '100%',
|
anchor: '100%',
|
||||||
padding: '0 5',
|
padding: '0 5'
|
||||||
},
|
},
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
@ -325,7 +326,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
name: 'step',
|
name: 'step',
|
||||||
value: 30,
|
value: 30,
|
||||||
minValue: 10,
|
minValue: 10,
|
||||||
qrupdate: true,
|
qrupdate: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
@ -334,23 +335,23 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
value: 6,
|
value: 6,
|
||||||
minValue: 6,
|
minValue: 6,
|
||||||
maxValue: 8,
|
maxValue: 8,
|
||||||
qrupdate: true,
|
qrupdate: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: gettext('Issuer Name'),
|
fieldLabel: gettext('Issuer Name'),
|
||||||
name: 'issuer',
|
name: 'issuer',
|
||||||
value: 'Proxmox Web UI',
|
value: 'Proxmox Web UI',
|
||||||
qrupdate: true,
|
qrupdate: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
name: 'name',
|
name: 'name',
|
||||||
cbind: {
|
cbind: {
|
||||||
value: '{userid}',
|
value: '{userid}'
|
||||||
},
|
},
|
||||||
qrupdate: true,
|
qrupdate: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -362,7 +363,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
'background-color': 'white',
|
'background-color': 'white',
|
||||||
padding: '5px',
|
padding: '5px',
|
||||||
width: '266px',
|
width: '266px',
|
||||||
height: '266px',
|
height: '266px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -392,7 +393,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
{
|
{
|
||||||
xtype: 'label',
|
xtype: 'label',
|
||||||
width: 500,
|
width: 500,
|
||||||
text: gettext('To register a U2F device, connect the device, then click the button and follow the instructions.'),
|
text: gettext('To register a U2F device, connect the device, then click the button and follow the instructions.')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user