From d69cebd8c703f0a1f6839944f1c949bce350b02e Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 13 Oct 2015 00:49:00 +0800 Subject: Bug 1199089 - add support for duo-security --- js/account.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'js/account.js') diff --git a/js/account.js b/js/account.js index 84a7da5bf..31c1a50e6 100644 --- a/js/account.js +++ b/js/account.js @@ -59,8 +59,10 @@ $(function() { $('#mfa-select').hide(); $('#update').attr('disabled', true); + $('#mfa-totp-enable-code').attr('required', true); $('#mfa-confirm').show(); $('.mfa-api-blurb').show(); + $('#mfa-enable-shared').show(); $('#mfa-enable-totp').show(); $('#mfa-totp-throbber').show(); $('#mfa-totp-issued').hide(); @@ -90,10 +92,25 @@ $(function() { }); }); + $('#mfa-select-duo') + .click(function(event) { + event.preventDefault(); + $('#mfa').val('Duo'); + + $('#mfa-select').hide(); + $('#update').attr('disabled', false); + $('#mfa-duo-user').attr('required', true); + $('#mfa-confirm').show(); + $('.mfa-api-blurb').show(); + $('#mfa-enable-shared').show(); + $('#mfa-enable-duo').show(); + $('#mfa-password').focus(); + }); + $('#mfa-disable') .click(function(event) { event.preventDefault(); - $('.mfa-api-blurb, #mfa-buttons').hide(); + $('.mfa-api-blurb, .mfa-buttons').hide(); $('#mfa-disable-container, #mfa-auth-container').show(); $('#mfa-confirm').show(); $('#mfa-password').focus(); @@ -105,7 +122,7 @@ $(function() { $('#mfa-recovery') .click(function(event) { event.preventDefault(); - $('.mfa-api-blurb, #mfa-buttons').hide(); + $('.mfa-api-blurb, .mfa-buttons').hide(); $('#mfa-recovery-container, #mfa-auth-container').show(); $('#mfa-password').focus(); $('#update').attr('disabled', false).val('Generate Printable Recovery Codes'); -- cgit v1.2.3-24-g4f1b