mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
WebUI: move OTP to be the last field in the PW reset form
Since TOTPs have a limited validity, let the user enter them as the last item in the form. This reduces the chance of the TOTP getting invalid while the user is still filling out other fields. Related: https://pagure.io/freeipa/issue/5628 Reviewed-By: Alexander Bokovoy <abbra@users.noreply.github.com>
This commit is contained in:
committed by
Florence Blanc-Renaud
parent
3ecea7800a
commit
13b177822e
@@ -776,13 +776,15 @@ IPA.user.password_dialog_pre_op0 = function(spec) {
|
||||
|
||||
IPA.user.password_dialog_pre_op = function(spec) {
|
||||
|
||||
spec.sections[0].fields.splice(0, 0, {
|
||||
spec.sections[0].fields.unshift({
|
||||
name: 'current_password',
|
||||
label: '@i18n:password.current_password',
|
||||
$type: 'password',
|
||||
required: true
|
||||
}, {
|
||||
name: 'otp',
|
||||
});
|
||||
|
||||
spec.sections[0].fields.push({
|
||||
name: 'otp',
|
||||
label: '@i18n:password.otp',
|
||||
$type: 'password'
|
||||
});
|
||||
|
||||
@@ -673,17 +673,6 @@ define(['dojo/_base/declare',
|
||||
show_errors: false,
|
||||
undo: false
|
||||
},
|
||||
{
|
||||
name: 'otp',
|
||||
$type: 'password',
|
||||
label: text.get('@i18n:password.otp', "OTP"),
|
||||
placeholder: text.get(
|
||||
'@i18n:password.otp_long',
|
||||
'One-Time-Password'
|
||||
),
|
||||
show_errors: false,
|
||||
undo: false
|
||||
},
|
||||
{
|
||||
name: 'new_password',
|
||||
$type: 'password',
|
||||
@@ -717,6 +706,17 @@ define(['dojo/_base/declare',
|
||||
}],
|
||||
show_errors: false,
|
||||
undo: false
|
||||
},
|
||||
{
|
||||
name: 'otp',
|
||||
$type: 'password',
|
||||
label: text.get('@i18n:password.otp', "OTP"),
|
||||
placeholder: text.get(
|
||||
'@i18n:password.otp_long',
|
||||
'One-Time-Password'
|
||||
),
|
||||
show_errors: false,
|
||||
undo: false
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user