Fix error message not displayed when creating a invitation link
This commit is contained in:
parent
790c9aa0d7
commit
fc651747ca
@ -1641,6 +1641,7 @@ define([
|
|||||||
var dismissButton = h('span.fa.fa-times');
|
var dismissButton = h('span.fa.fa-times');
|
||||||
var linkContent = h('div.cp-share-modal', [
|
var linkContent = h('div.cp-share-modal', [
|
||||||
h('p', Messages.team_inviteLinkTitle ), // XXX
|
h('p', Messages.team_inviteLinkTitle ), // XXX
|
||||||
|
linkError = h('div.alert.alert-danger.cp-teams-invite-alert', {style : 'display: none;'}),
|
||||||
linkForm = h('div.cp-teams-invite-form', [
|
linkForm = h('div.cp-teams-invite-form', [
|
||||||
linkName = h('input', {
|
linkName = h('input', {
|
||||||
placeholder: Messages.team_inviteLinkTempName // XXX
|
placeholder: Messages.team_inviteLinkTempName // XXX
|
||||||
@ -1677,7 +1678,6 @@ define([
|
|||||||
}, h('textarea', {
|
}, h('textarea', {
|
||||||
readonly: 'readonly'
|
readonly: 'readonly'
|
||||||
})),
|
})),
|
||||||
linkError = h('div.alert.alert-danger.cp-teams-invite-alert', {style : 'display: none;'}),
|
|
||||||
linkWarning = h('div.cp-teams-invite-alert.alert.alert-warning.dismissable', {
|
linkWarning = h('div.cp-teams-invite-alert.alert.alert-warning.dismissable', {
|
||||||
style: "display: none;"
|
style: "display: none;"
|
||||||
}, [
|
}, [
|
||||||
@ -1735,14 +1735,14 @@ define([
|
|||||||
hash: hash,
|
hash: hash,
|
||||||
teamId: config.teamId,
|
teamId: config.teamId,
|
||||||
seeds: seeds,
|
seeds: seeds,
|
||||||
}, waitFor(function (obj) {
|
}, waitFor(function (error) {
|
||||||
if (obj && obj.error) {
|
if (error) {
|
||||||
waitFor.abort();
|
waitFor.abort();
|
||||||
$(linkSpin).hide();
|
$(linkSpin).hide();
|
||||||
$(linkForm).show(); // XXX DB: check this is the right place to put things back
|
$(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-create').show();
|
||||||
$nav.find('button.cp-teams-invite-copy').hide();
|
$nav.find('button.cp-teams-invite-copy').hide();
|
||||||
return void $(linkError).text(Messages.team_inviteLinkError+obj.error).show(); // XXX
|
return void $(linkError).text(Messages.team_inviteLinkError+error).show(); // XXX
|
||||||
}
|
}
|
||||||
// Display result here
|
// Display result here
|
||||||
$(linkSpin).hide();
|
$(linkSpin).hide();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user