ui: tfa: also include validity check for password field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-04-05 13:33:19 +02:00
parent 54416bb319
commit cea0f76433

View File

@ -155,7 +155,8 @@ Ext.define('PVE.window.TFAEdit', {
var viewModel = me.getViewModel(); var viewModel = me.getViewModel();
var form = me.lookup('totp_form'); var form = me.lookup('totp_form');
var challenge = me.lookup('challenge'); var challenge = me.lookup('challenge');
viewModel.set('valid', form.isValid() && challenge.isValid()); var password = me.lookup('password');
viewModel.set('valid', form.isValid() && challenge.isValid() && password.isValid());
} }
}, },
'#': { '#': {
@ -436,8 +437,9 @@ Ext.define('PVE.window.TFAEdit', {
fieldLabel: gettext('Password'), fieldLabel: gettext('Password'),
minLength: 5, minLength: 5,
reference: 'password', reference: 'password',
padding: '0 5', allowBlank: false,
labelWidth: 120, validateBlank: true,
padding: '0 0 5 5',
emptyText: gettext('verify current password') emptyText: gettext('verify current password')
} }
], ],