From 05fed61671067cb6a750d41909ccb5692ba43808 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 29 Sep 2015 22:57:02 +0800 Subject: Bug 1199090 - add printable recovery 2fa codes --- js/account.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/account.js b/js/account.js index 12a6c7a10..84a7da5bf 100644 --- a/js/account.js +++ b/js/account.js @@ -93,15 +93,26 @@ $(function() { $('#mfa-disable') .click(function(event) { event.preventDefault(); - $('#mfa-disable-container').show(); + $('.mfa-api-blurb, #mfa-buttons').hide(); + $('#mfa-disable-container, #mfa-auth-container').show(); $('#mfa-confirm').show(); - $('.mfa-api-blurb').hide(); $('#mfa-password').focus(); $('#update').attr('disabled', false); $('.mfa-protected').hide(); $(this).hide(); }); + $('#mfa-recovery') + .click(function(event) { + event.preventDefault(); + $('.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'); + $('#mfa-action').val('recovery'); + $(this).hide(); + }); + var totp_popup; $('#mfa-totp-apps, #mfa-totp-text') .click(function(event) { -- cgit v1.2.3-24-g4f1b