show form and switch buttons if error

pull/1/head
David Benqué 5 years ago
parent 5302077be1
commit d2ea3c4221

@ -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) {
@ -1739,6 +1739,9 @@ define([
if (obj && obj.error) {
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

Loading…
Cancel
Save