Fixed email and SMS 2FA on style 2 login page.

This commit is contained in:
Ylian Saint-Hilaire 2020-09-29 16:28:22 -07:00
parent 6fe8bb1401
commit 5cd7e948e4
1 changed files with 5 additions and 2 deletions

View File

@ -522,7 +522,7 @@
function useEmailToken(panelAction) {
if (otpemail != true) return;
setDialogMode(1, "Secure Login", 3, useEmailKeyEx, "Send token to registered email address?");
setDialogMode(1, "Secure Login", 3, useEmailKeyEx, "Send token to registered email address?", panelAction);
}
function useEmailKeyEx(b, panelAction) {
@ -539,18 +539,21 @@
function useSMSToken(panelAction) {
if (otpsms != true) return;
setDialogMode(1, "Secure Login", 3, useSMSTokenEx, "Send token to registered phone number?");
setDialogMode(1, "Secure Login", 3, useSMSTokenEx, "Send token to registered phone number?", panelAction);
}
function useSMSTokenEx(b, panelAction) {
console.log('a1', panelAction);
if (panelAction == 1) {
Q('hwtokenInput').value = '**sms**';
QE('tokenOkButton', true);
Q('tokenOkButton').click();
console.log('a2');
} else if (panelAction == 2) {
Q('resetHwtokenInput').value = '**sms**';
QE('resetTokenOkButton', true);
Q('resetTokenOkButton').click();
console.log('a3');
}
}