ui: tfa: fix emptyText for password

One needs to enter their password, not the one from the user one
adds/deletes TFA.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-02-03 10:21:56 +01:00
parent cafccb5991
commit 2ba64bed18
4 changed files with 8 additions and 27 deletions

View File

@ -394,8 +394,8 @@ Ext.define('PBS.tfa.confirmRemove', {
validateBlank: true,
padding: '10 0 0 0',
cbind: {
emptyText: get =>
Ext.String.format(gettext("Confirm password of '{0}'"), get('userid')),
emptyText: () =>
Ext.String.format(gettext("Confirm your ({0}) password"), Proxmox.UserName),
},
},
],

View File

@ -42,12 +42,6 @@ Ext.define('PBS.window.AddTfaRecovery', {
has_entry: false,
userid: null,
},
formulas: {
passwordConfirmText: (get) => {
let id = get('userid');
return Ext.String.format(gettext("Confirm password of '{0}'"), id);
},
},
},
controller: {
@ -130,9 +124,8 @@ Ext.define('PBS.window.AddTfaRecovery', {
cbind: {
hidden: () => Proxmox.UserName === 'root@pam',
disabled: () => Proxmox.UserName === 'root@pam',
},
bind: {
emptyText: '{passwordConfirmText}',
emptyText: () =>
Ext.String.format(gettext("Confirm your ({0}) password"), Proxmox.UserName),
},
},
],

View File

@ -57,10 +57,6 @@ Ext.define('PBS.window.AddTotp', {
secretEmpty: function(get) {
return get('secret').length === 0;
},
passwordConfirmText: (get) => {
let id = get('userid');
return Ext.String.format(gettext("Confirm password of '{0}'"), id);
},
},
},
@ -257,9 +253,8 @@ Ext.define('PBS.window.AddTotp', {
cbind: {
hidden: () => Proxmox.UserName === 'root@pam',
disabled: () => Proxmox.UserName === 'root@pam',
},
bind: {
emptyText: '{passwordConfirmText}',
emptyText: () =>
Ext.String.format(gettext("Confirm your ({0}) password"), Proxmox.UserName),
},
},
],

View File

@ -24,12 +24,6 @@ Ext.define('PBS.window.AddWebauthn', {
valid: false,
userid: null,
},
formulas: {
passwordConfirmText: (get) => {
let id = get('userid');
return Ext.String.format(gettext("Confirm password of '{0}'"), id);
},
},
},
controller: {
@ -188,9 +182,8 @@ Ext.define('PBS.window.AddWebauthn', {
cbind: {
hidden: () => Proxmox.UserName === 'root@pam',
disabled: () => Proxmox.UserName === 'root@pam',
},
bind: {
emptyText: '{passwordConfirmText}',
emptyText: () =>
Ext.String.format(gettext("Confirm your ({0}) password"), Proxmox.UserName),
},
},
],