From d2ea3c42217e671dc2a5c4f1073bb3f9e0c4a034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 17 Dec 2019 11:18:38 +0000 Subject: [PATCH] show form and switch buttons if error --- www/common/common-ui-elements.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index a8f47c372..053059a55 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1719,7 +1719,7 @@ define([ $(linkForm).hide(); $(linkSpin).show(); $nav.find('button.cp-teams-invite-create').hide(); - $nav.find('button.cp-teams-invite-copy').show() + $nav.find('button.cp-teams-invite-copy').show(); setTimeout(waitFor(), 150); }).nThen(function (waitFor) { InviteInner.deriveBytes(seeds.scrypt, salt, waitFor(function (_bytes) { @@ -1737,8 +1737,11 @@ define([ seeds: seeds, }, waitFor(function (obj) { if (obj && obj.error) { - waitFor.abort(); + waitFor.abort(); $(linkSpin).hide(); + $(linkForm).show(); // XXX DB: check this is the right place to put things back + $nav.find('button.cp-teams-invite-create').show(); + $nav.find('button.cp-teams-invite-copy').hide(); return void $(linkError).text(Messages.team_inviteLinkError+obj.error).show(); // XXX } // Display result here