Skip to content

Commit

Permalink
Fixed Duo Boost UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Dec 31, 2024
1 parent 2a274fe commit c4592dc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions views/default3.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -13847,6 +13847,27 @@
});
}

function account_manageAuthDuo() {
if (xxdialogMode || ((features2 & 0x20000000) == 0)) return;
var duoU2Fenabled = ((userinfo.otpduo == 1));
if (duoU2Fenabled == false) {
setModalContent('xxAddAgent', 'Duo Authentication', "Confirm enabling of Duo 2FA login security. Once enabled you will be given the option to use Duo at login for added security. Click ok to go thru the steps to enable Duo." + '<p style="text-align:center;margin-top:10px"><img src="images/duo-2fa-250.png"></p>');
showModal('xxAddAgentModal', 'idx_dlgOkButton', function () {
window.location.href = '/add-duo?rurl=' + encodeURIComponentEx(window.location.href) + ((urlargs.key)?('&key=' + urlargs.key):'');
});
} else {
setModalContent('xxAddAgent', 'Duo Authentication', '<p><label><input id=duo2facheck type=checkbox onclick=account_manageAuthDuoConfirm() />' + ' ' + "Confirm disabling 2FA Duo login security." + '</label></p>' + '<p style="text-align: center"><img src="images/duo-2fa-250-disable.png"></p>');
showModal('xxAddAgentModal', 'idx_dlgOkButton', function () {
meshserver.send({ action: 'otpduo', enabled: false });
});
QE('idx_dlgOkButton', false);
}
}

function account_manageAuthDuoConfirm() {
QE('idx_dlgOkButton', Q('duo2facheck').checked);
}

function account_manageAuthApp() {
if (xxdialogMode || ((features & 4096) == 0)) return;
if (userinfo.otpsecret == 1) { account_removeOtp(); } else { account_addOtp(); }
Expand Down

0 comments on commit c4592dc

Please sign in to comment.