Fixed Duo Boost UI.
Ylian Saint-Hilaire committed
Dec 31, 2024 at 14:11 UTC
c4592dcc4faf6657a4607c0d0fecef4f1c0bc101
1 file changed
+21
views/default3.handlebars
+21
@@ -13847,6 +13847,27 @@
13847
});
13848
}
13849
13850
+ function account_manageAuthDuo() {
13851
+ if (xxdialogMode || ((features2 & 0x20000000) == 0)) return;
13852
+ var duoU2Fenabled = ((userinfo.otpduo == 1));
13853
+ if (duoU2Fenabled == false) {
13854
+ 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>');
13855
+ showModal('xxAddAgentModal', 'idx_dlgOkButton', function () {
13856
+ window.location.href = '/add-duo?rurl=' + encodeURIComponentEx(window.location.href) + ((urlargs.key)?('&key=' + urlargs.key):'');
13857
+ });
13858
+ } else {
13859
+ 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>');
13860
+ showModal('xxAddAgentModal', 'idx_dlgOkButton', function () {
13861
+ meshserver.send({ action: 'otpduo', enabled: false });
13862
+ });
13863
+ QE('idx_dlgOkButton', false);
13864
+ }
13865
+ }
13866
+
13867
+ function account_manageAuthDuoConfirm() {
13868
+ QE('idx_dlgOkButton', Q('duo2facheck').checked);
13869
+ }
13870
+
13871
function account_manageAuthApp() {
13872
if (xxdialogMode || ((features & 4096) == 0)) return;
13873
if (userinfo.otpsecret == 1) { account_removeOtp(); } else { account_addOtp(); }