mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
parent
2c54eb253b
commit
4b2be8c6b3
@ -54,7 +54,7 @@ export default Component.extend(bufferedProperty("invite"), {
|
|||||||
moment()
|
moment()
|
||||||
.add(this.siteSettings.invite_expiry_days, "days")
|
.add(this.siteSettings.invite_expiry_days, "days")
|
||||||
.format(FORMAT),
|
.format(FORMAT),
|
||||||
groupIds: this.model.invite?.groupIds,
|
groupIds: this.model.groupIds ?? this.model.invite?.groupIds,
|
||||||
topicId: this.model.invite?.topicId,
|
topicId: this.model.invite?.topicId,
|
||||||
topicTitle: this.model.invite?.topicTitle,
|
topicTitle: this.model.invite?.topicTitle,
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@ export default DiscourseRoute.extend({
|
|||||||
showInviteModal() {
|
showInviteModal() {
|
||||||
const group = this.modelFor("group");
|
const group = this.modelFor("group");
|
||||||
this.modal.show(CreateInvite, {
|
this.modal.show(CreateInvite, {
|
||||||
model: { invite: { groupIds: [group.id] } },
|
model: { groupIds: [group.id] },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -262,6 +262,8 @@ acceptance(
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
server.post("/invites", () => helper.response({}));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("shows correct saved data in form", async function (assert) {
|
test("shows correct saved data in form", async function (assert) {
|
||||||
@ -281,6 +283,8 @@ acceptance(
|
|||||||
await visit("/g/discourse");
|
await visit("/g/discourse");
|
||||||
await click(".group-members-invite");
|
await click(".group-members-invite");
|
||||||
assert.dom(".invite-to-groups .formatted-selection").hasText("Discourse");
|
assert.dom(".invite-to-groups .formatted-selection").hasText("Discourse");
|
||||||
|
|
||||||
|
await click(".save-invite");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user