ui: tfa: move randomize button right of secret field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-04-03 15:16:24 +02:00
parent a12805fbd4
commit a8740316e3

View File

@ -297,15 +297,27 @@ Ext.define('PVE.window.TFAEdit', {
}, },
items: [ items: [
{ {
xtype: 'textfield', layout: 'hbox',
fieldLabel: gettext('Secret'), border: false,
name: 'secret', padding: '5 0',
reference: 'tfa-secret', items: [{
validateValue: function(value) { xtype: 'textfield',
return value.match(/^[A-Z2-7=]$/); fieldLabel: gettext('Secret'),
name: 'secret',
reference: 'tfa_secret',
validateValue: function(value) {
return value.match(/^[A-Z2-7=]$/);
},
qrupdate: true,
flex: 4
}, },
qrupdate: true, {
padding: '5 5', xtype: 'button',
text: gettext('Randomize'),
reference: 'randomize_button',
handler: 'randomizeSecret',
flex: 1
}]
}, },
{ {
xtype: 'numberfield', xtype: 'numberfield',
@ -399,15 +411,6 @@ Ext.define('PVE.window.TFAEdit', {
], ],
buttons: [ buttons: [
{
text: gettext('Randomize'),
reference: 'randomize-button',
handler: 'randomizeSecret',
bind: {
hidden: '{!in_totp_tab}',
disabled: '{!user_tfa}'
}
},
{ {
text: gettext('Apply'), text: gettext('Apply'),
handler: 'applySettings', handler: 'applySettings',