mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
invite: Migrate email invite success banner to new banner component.
This commit is contained in:
@@ -177,15 +177,23 @@ function submit_invitation_form(): void {
|
|||||||
beforeSend,
|
beforeSend,
|
||||||
success() {
|
success() {
|
||||||
const number_of_invites_sent = email_pill_widget.items().length;
|
const number_of_invites_sent = email_pill_widget.items().length;
|
||||||
ui_report.success(
|
banners.open(
|
||||||
$t_html(
|
{
|
||||||
{
|
intent: "success",
|
||||||
defaultMessage:
|
label: new Handlebars.SafeString(
|
||||||
"{N, plural, one {User invited successfully.} other {Users invited successfully.}}",
|
$t_html(
|
||||||
},
|
{
|
||||||
{N: number_of_invites_sent},
|
defaultMessage:
|
||||||
),
|
"{N, plural, one {User invited successfully.} other {Users invited successfully.}}",
|
||||||
$invite_status,
|
},
|
||||||
|
{N: number_of_invites_sent},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
buttons: [],
|
||||||
|
close_button: false,
|
||||||
|
custom_classes: "invite-user-modal-banner",
|
||||||
|
},
|
||||||
|
$("#invite-success-banner-container"),
|
||||||
);
|
);
|
||||||
email_pill_widget.clear();
|
email_pill_widget.clear();
|
||||||
|
|
||||||
@@ -226,7 +234,7 @@ function submit_invitation_form(): void {
|
|||||||
.safeParse(xhr.responseJSON);
|
.safeParse(xhr.responseJSON);
|
||||||
if (!parsed.success) {
|
if (!parsed.success) {
|
||||||
// There was a fatal error, no partial processing occurred.
|
// There was a fatal error, no partial processing occurred.
|
||||||
ui_report.error("", xhr, $invite_status);
|
ui_report.error($t({defaultMessage: "Failed"}), xhr, $invite_status);
|
||||||
} else {
|
} else {
|
||||||
// Some users were not invited.
|
// Some users were not invited.
|
||||||
const invitee_emails_errored = [];
|
const invitee_emails_errored = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user