Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

modals: Rename body_html/html_body -> modal_content_html in codebase.

Sayam Samal89d058233147
diff --git a/web/src/alert_words_ui.ts b/web/src/alert_words_ui.ts
index 0a1e054b8be..0cf40a6d1d1 100644
--- a/web/src/alert_words_ui.ts
+++ b/web/src/alert_words_ui.ts
@@ -103,7 +103,7 @@ function remove_alert_word(alert_word: string): void {
}
export function show_add_alert_word_modal(): void {
- const html_body = render_add_alert_word();
+ const modal_content_html = render_add_alert_word();
function add_alert_word_post_render(): void {
const $add_user_group_input_element = $<HTMLInputElement>("input#add-alert-word-name");
@@ -120,7 +120,7 @@ export function show_add_alert_word_modal(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Add a new alert word"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Add"}),
help_link: "/help/dm-mention-alert-notifications#alert-words",
form_id: "add-alert-word-form",
diff --git a/web/src/attachments_ui.ts b/web/src/attachments_ui.ts
index 28d025ed96b..2651b78b4ee 100644
--- a/web/src/attachments_ui.ts
+++ b/web/src/attachments_ui.ts
@@ -116,11 +116,11 @@ function set_upload_space_stats(): void {
}
function delete_attachments(attachment: string, file_name: string): void {
- const html_body = render_confirm_delete_attachment({file_name});
+ const modal_content_html = render_confirm_delete_attachment({file_name});
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Delete file?"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Delete"}),
focus_submit_on_open: true,
on_click() {
@@ -249,7 +249,7 @@ export function set_up_attachments(): void {
}
export function suggest_delete_detached_attachments(attachments_list: ServerAttachment[]): void {
- const html_body = render_confirm_delete_detached_attachments_modal({
+ const modal_content_html = render_confirm_delete_detached_attachments_modal({
attachments_list,
realm_message_edit_history_is_visible:
realm.realm_message_edit_history_visibility_policy !==
@@ -296,7 +296,7 @@ export function suggest_delete_detached_attachments(attachments_list: ServerAtta
dialog_widget.launch({
id: "confirm_delete_attachments_modal",
html_heading: $t_html({defaultMessage: "Delete uploaded files?"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Delete"}),
html_exit_button: $t_html({defaultMessage: "Don't delete"}),
loading_spinner: true,
diff --git a/web/src/avatar.ts b/web/src/avatar.ts
index 5e20c43ed43..5f7209d6eed 100644
--- a/web/src/avatar.ts
+++ b/web/src/avatar.ts
@@ -107,11 +107,11 @@ export function build_user_avatar_widget(upload_function: UploadFunction): void
},
});
}
- const html_body = render_confirm_delete_user_avatar({});
+ const modal_content_html = render_confirm_delete_user_avatar({});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete profile picture"}),
- html_body,
+ modal_content_html,
on_click: delete_user_avatar,
});
});
diff --git a/web/src/channel_folders_ui.ts b/web/src/channel_folders_ui.ts
index e2582d84e52..8e391527f13 100644
--- a/web/src/channel_folders_ui.ts
+++ b/web/src/channel_folders_ui.ts
@@ -38,7 +38,7 @@ function compare_by_name(a: dropdown_widget.Option, b: dropdown_widget.Option):
}
export function add_channel_folder(): void {
- const html_body = render_create_channel_folder_modal({
+ const modal_content_html = render_create_channel_folder_modal({
max_channel_folder_name_length: realm.max_channel_folder_name_length,
max_channel_folder_description_length: realm.max_channel_folder_description_length,
});
@@ -84,7 +84,7 @@ export function add_channel_folder(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Create channel folder"}),
- html_body,
+ modal_content_html,
id: "create_channel_folder",
html_submit_button: $t_html({defaultMessage: "Create"}),
on_click: create_channel_folder,
@@ -183,7 +183,7 @@ function archive_folder(folder_id: number): void {
export function handle_archiving_channel_folder(folder_id: number): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete channel folder?"}),
- html_body: render_confirm_archive_channel_folder(),
+ modal_content_html: render_confirm_archive_channel_folder(),
on_click() {
archive_folder(folder_id);
},
@@ -446,7 +446,7 @@ export function handle_editing_channel_folder(folder_id: number): void {
const subs = channel_folders.get_sorted_streams_in_folder(folder_id);
const can_manage_folder = settings_data.can_user_manage_folder();
- const html_body = render_edit_channel_folder_modal({
+ const modal_content_html = render_edit_channel_folder_modal({
name: folder.name,
description: folder.description,
folder_id,
@@ -469,7 +469,7 @@ export function handle_editing_channel_folder(folder_id: number): void {
dialog_widget.launch({
html_heading,
- html_body,
+ modal_content_html,
id: "edit_channel_folder",
on_click() {
if (!can_manage_folder) {
diff --git a/web/src/compose_setup.ts b/web/src/compose_setup.ts
index 3b470cb52d7..18057bbbc3a 100644
--- a/web/src/compose_setup.ts
+++ b/web/src/compose_setup.ts
@@ -482,7 +482,7 @@ export function initialize(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Create a poll"}),
- html_body: render_add_poll_modal(),
+ modal_content_html: render_add_poll_modal(),
html_submit_button: $t_html({defaultMessage: "Add poll"}),
close_on_submit: true,
on_click(e) {
@@ -544,7 +544,7 @@ export function initialize(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Create a collaborative to-do list"}),
- html_body: render_add_todo_list_modal(),
+ modal_content_html: render_add_todo_list_modal(),
html_submit_button: $t_html({defaultMessage: "Create to-do list"}),
close_on_submit: true,
on_click(e) {
diff --git a/web/src/demo_organizations_ui.ts b/web/src/demo_organizations_ui.ts
index 477743fee6a..a63c04c9882 100644
--- a/web/src/demo_organizations_ui.ts
+++ b/web/src/demo_organizations_ui.ts
@@ -99,7 +99,7 @@ export function show_convert_demo_organization_modal(): void {
const parts = new URL(realm.realm_url).hostname.split(".");
parts.shift();
const domain = parts.join(".");
- const html_body = render_convert_demo_organization_form({
+ const modal_content_html = render_convert_demo_organization_form({
realm_domain: domain,
user_has_email_set: email_set,
});
@@ -140,7 +140,7 @@ export function show_convert_demo_organization_modal(): void {
dialog_widget.launch({
html_heading: $t({defaultMessage: "Make organization permanent"}),
- html_body,
+ modal_content_html,
on_click: submit_subdomain,
post_render: demo_organization_conversion_post_render,
html_submit_button: $t({defaultMessage: "Convert"}),
diff --git a/web/src/deprecated_feature_notice.ts b/web/src/deprecated_feature_notice.ts
index 14cd0013ab1..25db8145b9a 100644
--- a/web/src/deprecated_feature_notice.ts
+++ b/web/src/deprecated_feature_notice.ts
@@ -52,7 +52,7 @@ export function maybe_show_deprecation_notice(key: string): void {
if (!shown_deprecation_notices.includes(key)) {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Deprecation notice"}),
- html_body: message,
+ modal_content_html: message,
html_submit_button: $t_html({defaultMessage: "Got it"}),
on_click() {
return;
diff --git a/web/src/dialog_widget.ts b/web/src/dialog_widget.ts
index 744439398de..493b344c3b6 100644
--- a/web/src/dialog_widget.ts
+++ b/web/src/dialog_widget.ts
@@ -63,7 +63,7 @@ function current_dialog_widget_selector(): string {
export type DialogWidgetConfig = {
html_heading?: string;
text_heading?: string;
- html_body: string;
+ modal_content_html: string;
on_click?: (e: JQuery.ClickEvent) => void;
hide_footer?: boolean;
html_submit_button?: string;
@@ -163,7 +163,7 @@ export function get_current_values($inputs: JQuery): Record<string, unknown> {
export function launch(conf: DialogWidgetConfig): string {
// Mandatory fields:
// * html_heading | text_heading
- // * html_body
+ // * modal_content_html
// The html_ fields should be safe HTML. If callers
// interpolate user data into strings, they should use
// templates.
@@ -205,7 +205,7 @@ export function launch(conf: DialogWidgetConfig): string {
link: conf.help_link,
submit_button_html,
exit_button_html,
- body_html: conf.html_body,
+ modal_content_html: conf.modal_content_html,
id: conf.id,
single_footer_button: conf.single_footer_button,
always_visible_scrollbar: conf.always_visible_scrollbar,
diff --git a/web/src/drafts.ts b/web/src/drafts.ts
index 7fae0a6a36c..436def7fb2f 100644
--- a/web/src/drafts.ts
+++ b/web/src/drafts.ts
@@ -279,11 +279,11 @@ export function delete_all_drafts(): void {
}
export function confirm_delete_all_drafts(): void {
- const html_body = render_confirm_delete_all_drafts();
+ const modal_content_html = render_confirm_delete_all_drafts();
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete all drafts"}),
- html_body,
+ modal_content_html,
on_click: delete_all_drafts,
});
}
diff --git a/web/src/inbox_ui.ts b/web/src/inbox_ui.ts
index 9e2c6da0ebd..687f1334818 100644
--- a/web/src/inbox_ui.ts
+++ b/web/src/inbox_ui.ts
@@ -376,7 +376,7 @@ export function show(filter?: Filter): void {
});
if (onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_inbox_view_modal")) {
- const html_body = render_introduce_zulip_view_modal({
+ const modal_content_html = render_introduce_zulip_view_modal({
zulip_view: "inbox",
current_home_view_and_escape_navigation_enabled:
user_settings.web_home_view === "inbox" &&
@@ -384,7 +384,7 @@ export function show(filter?: Filter): void {
});
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Welcome to your inbox!"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Got it"}),
on_click() {
// Do nothing
diff --git a/web/src/integration_url_modal.ts b/web/src/integration_url_modal.ts
index 6714ffd937a..5850270ae5a 100644
--- a/web/src/integration_url_modal.ts
+++ b/web/src/integration_url_modal.ts
@@ -57,7 +57,7 @@ export function show_generate_integration_url_modal(api_key: string): void {
name: $t_html({defaultMessage: "Matching Zulip channel"}),
unique_id: -2,
};
- const html_body = render_generate_integration_url_modal({
+ const modal_content_html = render_generate_integration_url_modal({
default_url_message,
max_topic_length: realm.max_topic_length,
});
@@ -566,7 +566,7 @@ export function show_generate_integration_url_modal(api_key: string): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Generate URL for an integration"}),
- html_body,
+ modal_content_html,
id: "generate-integration-url-modal",
html_submit_button: $t_html({defaultMessage: "Copy URL"}),
html_exit_button: $t_html({defaultMessage: "Close"}),
diff --git a/web/src/invite.ts b/web/src/invite.ts
index 99264b44391..16e374f9794 100644
--- a/web/src/invite.ts
+++ b/web/src/invite.ts
@@ -493,7 +493,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent<Document, undefined>): void
const show_group_pill_container =
user_group_picker_pill.get_user_groups_allowed_to_add_members().length > 0;
- const html_body = render_invite_user_modal({
+ const modal_content_html = render_invite_user_modal({
is_admin: current_user.is_admin,
is_owner: current_user.is_owner,
show_group_pill_container,
@@ -716,7 +716,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent<Document, undefined>): void
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Invite users to organization"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Invite"}),
id: "invite-user-modal",
loading_spinner: true,
diff --git a/web/src/message_delete.ts b/web/src/message_delete.ts
index e098060463c..6777504471e 100644
--- a/web/src/message_delete.ts
+++ b/web/src/message_delete.ts
@@ -91,7 +91,7 @@ export function get_deletability(message: Message): boolean {
}
export function delete_message(msg_id: number): void {
- const html_body = render_delete_message_modal();
+ const modal_content_html = render_delete_message_modal();
function do_delete_message(): void {
currently_deleting_messages.push(msg_id);
@@ -121,7 +121,7 @@ export function delete_message(msg_id: number): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete message?"}),
- html_body,
+ modal_content_html,
help_link: "/help/delete-a-message#delete-a-message-completely",
on_click: do_delete_message,
loading_spinner: true,
diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts
index 25428b47f3d..7cf7782d542 100644
--- a/web/src/message_edit.ts
+++ b/web/src/message_edit.ts
@@ -919,7 +919,7 @@ function handle_resolve_topic_failure_due_to_time_limit(topic_is_resolved: boole
topic_is_resolved,
);
- const html_body = render_resolve_topic_time_limit_error_modal({
+ const modal_content_html = render_resolve_topic_time_limit_error_modal({
topic_is_resolved,
resolve_topic_time_limit_error_string,
});
@@ -931,7 +931,7 @@ function handle_resolve_topic_failure_due_to_time_limit(topic_is_resolved: boole
}
dialog_widget.launch({
html_heading: modal_heading,
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Close"}),
on_click() {
/* Nothing extra needs to happen when the dialog is closed. */
@@ -944,7 +944,7 @@ function handle_resolve_topic_failure_due_to_time_limit(topic_is_resolved: boole
function show_intro_resolve_topic_modal(topic_name: string, cb: () => void): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Mark topic as resolved"}),
- html_body: render_intro_resolve_topic_modal({topic_name}),
+ modal_content_html: render_intro_resolve_topic_modal({topic_name}),
id: "intro_resolve_topic_modal",
on_click: cb,
html_submit_button: $t({defaultMessage: "Got it — Confirm"}),
@@ -1206,7 +1206,7 @@ export function try_save_inline_topic_edit($row: JQuery): void {
if (stream_topics.includes(new_topic)) {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Merge with another topic?"}),
- html_body: render_confirm_merge_topics_with_rename({
+ modal_content_html: render_confirm_merge_topics_with_rename({
topic_display_name: util.get_final_topic_display_name(new_topic),
is_empty_string_topic: new_topic === "",
}),
@@ -1501,7 +1501,7 @@ export function maybe_show_edit($row: JQuery, id: number): void {
function warn_user_about_unread_msgs(last_sent_msg_id: number, num_unread: number): void {
confirm_dialog.launch({
html_heading: $t({defaultMessage: "Edit your last message?"}),
- html_body: render_confirm_edit_messages({
+ modal_content_html: render_confirm_edit_messages({
num_unread,
}),
on_click() {
@@ -1611,13 +1611,13 @@ function handle_message_move_failure_due_to_time_limit(
},
);
- const html_body = render_confirm_moving_messages_modal({
+ const modal_content_html = render_confirm_moving_messages_modal({
messages_allowed_to_move_text,
messages_not_allowed_to_move_text,
});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Move some messages?"}),
- html_body,
+ modal_content_html,
on_click: handle_confirm,
loading_spinner: true,
...(on_hide_callback !== undefined && {on_hide: on_hide_callback}),
diff --git a/web/src/message_report.ts b/web/src/message_report.ts
index 16b3a9e4411..e93169721e6 100644
--- a/web/src/message_report.ts
+++ b/web/src/message_report.ts
@@ -131,7 +131,7 @@ export function show_message_report_modal(message: Message): void {
is_archived = stream_data.is_stream_archived_by_id(stream_id);
}
const message_preview_body_args = get_message_container_for_preview(message);
- const html_body = render_report_message_modal({
+ const modal_content_html = render_report_message_modal({
recipient_row_data: get_message_group_for_message_preview(message),
message_container_data: {
...message_preview_body_args,
@@ -274,7 +274,7 @@ export function show_message_report_modal(message: Message): void {
html_heading: $t_html({
defaultMessage: "Report a message",
}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Submit"}),
help_link: "/help/report-a-message",
id: "message_report_modal",
diff --git a/web/src/message_summary.ts b/web/src/message_summary.ts
index 63988b2ee79..c7185a7a2fd 100644
--- a/web/src/message_summary.ts
+++ b/web/src/message_summary.ts
@@ -44,7 +44,7 @@ export function get_narrow_summary(channel_id: number, topic_name: string): void
}
dialog_widget.launch({
text_heading: display_topic_name,
- html_body: "",
+ modal_content_html: "",
close_on_submit: true,
id: "topic-summary-modal",
footer_minor_text: $t({defaultMessage: "AI summaries may have errors."}),
diff --git a/web/src/onboarding_steps.ts b/web/src/onboarding_steps.ts
index f32e1ffdfb4..92921423d44 100644
--- a/web/src/onboarding_steps.ts
+++ b/web/src/onboarding_steps.ts
@@ -96,14 +96,14 @@ function narrow_to_dm_with_welcome_bot_new_user(
function show_navigation_tour_video(navigation_tour_video_url: string | null): void {
if (ONE_TIME_NOTICES_TO_DISPLAY.has("navigation_tour_video")) {
assert(navigation_tour_video_url !== null);
- const html_body = render_navigation_tour_video_modal({
+ const modal_content_html = render_navigation_tour_video_modal({
video_src: navigation_tour_video_url,
poster_src: "/static/images/navigation-tour-video-thumbnail.png",
});
let watch_later_clicked = false;
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Welcome to Zulip!"}),
- html_body,
+ modal_content_html,
on_click() {
// Do nothing
},
diff --git a/web/src/recent_view_ui.ts b/web/src/recent_view_ui.ts
index bad64a56ae3..792396c94cd 100644
--- a/web/src/recent_view_ui.ts
+++ b/web/src/recent_view_ui.ts
@@ -1440,7 +1440,7 @@ export function show(): void {
}
if (onboarding_steps.ONE_TIME_NOTICES_TO_DISPLAY.has("intro_recent_view_modal")) {
- const html_body = render_introduce_zulip_view_modal({
+ const modal_content_html = render_introduce_zulip_view_modal({
zulip_view: "recent_conversations",
current_home_view_and_escape_navigation_enabled:
user_settings.web_home_view === "recent" &&
@@ -1448,7 +1448,7 @@ export function show(): void {
});
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Welcome to recent conversations!"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Got it"}),
on_click() {
/* This widget is purely informational and clicking only closes it. */
diff --git a/web/src/saved_snippets_ui.ts b/web/src/saved_snippets_ui.ts
index 687de38a415..a228cb900a0 100644
--- a/web/src/saved_snippets_ui.ts
+++ b/web/src/saved_snippets_ui.ts
@@ -108,7 +108,7 @@ function item_button_click_callback(event: JQuery.ClickEvent): void {
) {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete saved snippet?"}),
- html_body: render_confirm_delete_saved_snippet(),
+ modal_content_html: render_confirm_delete_saved_snippet(),
on_click() {
const saved_snippet_id = $(event.target)
.closest(".list-item")
@@ -133,7 +133,7 @@ function item_button_click_callback(event: JQuery.ClickEvent): void {
assert(saved_snippet !== undefined);
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Edit saved snippet"}),
- html_body: render_edit_saved_snippet_modal({
+ modal_content_html: render_edit_saved_snippet_modal({
title: saved_snippet.title,
content: saved_snippet.content,
}),
@@ -176,7 +176,7 @@ function item_click_callback(
if (is_sticky_bottom_option_clicked) {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Create a new saved snippet"}),
- html_body: render_add_saved_snippet_modal({
+ modal_content_html: render_add_saved_snippet_modal({
prepopulated_content: $target_textarea.val(),
}),
html_submit_button: $t_html({defaultMessage: "Save"}),
diff --git a/web/src/settings_account.ts b/web/src/settings_account.ts
index 4e54a229c99..a49efaac447 100644
--- a/web/src/settings_account.ts
+++ b/web/src/settings_account.ts
@@ -549,7 +549,7 @@ export function set_up(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Change password"}),
- html_body: render_dialog_change_password({
+ modal_content_html: render_dialog_change_password({
password_min_length: realm.password_min_length,
password_max_length: realm.password_max_length,
password_min_guesses: realm.password_min_guesses,
@@ -687,7 +687,9 @@ export function set_up(): void {
if (settings_data.user_can_change_email()) {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Change email"}),
- html_body: render_change_email_modal({delivery_email: current_user.delivery_email}),
+ modal_content_html: render_change_email_modal({
+ delivery_email: current_user.delivery_email,
+ }),
html_submit_button: $t_html({defaultMessage: "Change"}),
loading_spinner: true,
id: "change_email_modal",
@@ -777,7 +779,7 @@ export function set_up(): void {
) {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Add email"}),
- html_body: render_demo_organization_add_email_modal({
+ modal_content_html: render_demo_organization_add_email_modal({
delivery_email: current_user.delivery_email,
full_name: current_user.full_name,
email_address_visibility_values:
diff --git a/web/src/settings_bots.ts b/web/src/settings_bots.ts
index 9781aa64b12..bbd1c69e76e 100644
--- a/web/src/settings_bots.ts
+++ b/web/src/settings_bots.ts
@@ -238,7 +238,7 @@ function bot_owner_full_name(owner_id: number | null): string | undefined {
}
export function add_a_new_bot(): void {
- const html_body = render_add_new_bot_form({
+ const modal_content_html = render_add_new_bot_form({
bot_types: get_allowed_bot_types(),
realm_embedded_bots: realm.realm_embedded_bots,
realm_bot_domain: realm.realm_bot_domain,
@@ -366,7 +366,7 @@ export function add_a_new_bot(): void {
dialog_widget.launch({
form_id: "create_bot_form",
help_link: "/help/add-a-bot-or-integration",
- html_body,
+ modal_content_html,
html_heading: $t_html({defaultMessage: "Add a new bot"}),
html_submit_button: $t_html({defaultMessage: "Add"}),
loading_spinner: true,
diff --git a/web/src/settings_emoji.ts b/web/src/settings_emoji.ts
index 2ec43f67d7c..2c9f54121da 100644
--- a/web/src/settings_emoji.ts
+++ b/web/src/settings_emoji.ts
@@ -205,7 +205,7 @@ export function add_custom_emoji_post_render(): void {
}
function show_modal(): void {
- const html_body = render_add_emoji({});
+ const modal_content_html = render_add_emoji({});
function add_custom_emoji(): void {
dialog_widget.show_dialog_spinner();
@@ -278,12 +278,12 @@ function show_modal(): void {
}
dialog_widget.close(() => {
- const html_body = emoji_settings_warning_modal({
+ const modal_content_html = emoji_settings_warning_modal({
emoji_name: emoji["name"],
});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Override default emoji?"}),
- html_body,
+ modal_content_html,
on_click() {
submit_custom_emoji_request(formData);
},
@@ -295,7 +295,7 @@ function show_modal(): void {
}
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Add a new emoji"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Confirm"}),
id: "add-custom-emoji-modal",
form_id: "add-custom-emoji-form",
@@ -325,7 +325,7 @@ export function set_up(): void {
const url =
"/json/realm/emoji/" +
encodeURIComponent($button.closest("tr").attr("data-emoji-name")!);
- const html_body = render_confirm_deactivate_custom_emoji({});
+ const modal_content_html = render_confirm_deactivate_custom_emoji({});
const opts = {
success_continuation() {
@@ -336,7 +336,7 @@ export function set_up(): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Deactivate custom emoji?"}),
- html_body,
+ modal_content_html,
id: "confirm_deactivate_custom_emoji_modal",
on_click() {
dialog_widget.submit_api_request(channel.del, url, {}, opts);
diff --git a/web/src/settings_exports.ts b/web/src/settings_exports.ts
index 88840579b03..34557d3ba53 100644
--- a/web/src/settings_exports.ts
+++ b/web/src/settings_exports.ts
@@ -378,7 +378,7 @@ function maybe_show_notes_about_unusable_users_if_exported(
}
function show_start_export_modal(): void {
- const html_body = render_start_export_modal({
+ const modal_content_html = render_start_export_modal({
export_type_values: get_export_type_options_to_render(),
});
@@ -444,7 +444,7 @@ function show_start_export_modal(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Start export?"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Start export"}),
id: "start-export-modal",
loading_spinner: true,
@@ -529,11 +529,11 @@ export function set_up(): void {
const url =
"/json/export/realm/" +
encodeURIComponent($button.closest("tr").attr("data-export-id")!);
- const html_body = render_confirm_delete_data_export();
+ const modal_content_html = render_confirm_delete_data_export();
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete data export?"}),
- html_body,
+ modal_content_html,
on_click() {
dialog_widget.submit_api_request(channel.del, url, {});
},
diff --git a/web/src/settings_invites.ts b/web/src/settings_invites.ts
index 91d824c1a48..03738674ab9 100644
--- a/web/src/settings_invites.ts
+++ b/web/src/settings_invites.ts
@@ -280,13 +280,13 @@ export function on_load_success(
email,
referred_by,
};
- const html_body = render_settings_revoke_invite_modal(ctx);
+ const modal_content_html = render_settings_revoke_invite_modal(ctx);
confirm_dialog.launch({
html_heading: ctx.is_multiuse
? $t_html({defaultMessage: "Revoke invitation link"})
: $t_html({defaultMessage: "Revoke invitation to {email}"}, {email}),
- html_body,
+ modal_content_html,
id: "revoke_invite_modal",
close_on_submit: false,
loading_spinner: true,
@@ -308,11 +308,11 @@ export function on_load_success(
const $row = $(this).closest(".invite_row");
const email = $row.find(".email").text();
const invite_id = $(this).closest("tr").attr("data-invite-id")!;
- const html_body = render_settings_resend_invite_modal({email});
+ const modal_content_html = render_settings_resend_invite_modal({email});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Resend invitation?"}),
- html_body,
+ modal_content_html,
id: "resend_invite_modal",
close_on_submit: false,
loading_spinner: true,
diff --git a/web/src/settings_linkifiers.ts b/web/src/settings_linkifiers.ts
index 494118108f4..ccf125c22fe 100644
--- a/web/src/settings_linkifiers.ts
+++ b/web/src/settings_linkifiers.ts
@@ -40,7 +40,7 @@ function open_linkifier_edit_form(linkifier_id: number): void {
const linkifiers_list = realm.realm_linkifiers;
const linkifier = linkifiers_list.find((linkifier) => linkifier.id === linkifier_id);
assert(linkifier !== undefined);
- const html_body = render_admin_linkifier_edit_form({
+ const modal_content_html = render_admin_linkifier_edit_form({
linkifier_id,
pattern: linkifier.pattern,
url_template: linkifier.url_template,
@@ -101,7 +101,7 @@ function open_linkifier_edit_form(linkifier_id: number): void {
const dialog_widget_id = dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Edit linkfiers"}),
- html_body,
+ modal_content_html,
on_click() {
submit_linkifier_form(dialog_widget_id);
},
@@ -219,14 +219,14 @@ export function build_page(): void {
e.preventDefault();
e.stopPropagation();
const $button = $(this);
- const html_body = render_confirm_delete_linkifier();
+ const modal_content_html = render_confirm_delete_linkifier();
const url =
"/json/realm/filters/" +
encodeURIComponent($button.closest("tr").attr("data-linkifier-id")!);
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete linkifier?"}),
- html_body,
+ modal_content_html,
id: "confirm_delete_linkifiers_modal",
on_click() {
dialog_widget.submit_api_request(channel.del, url, {});
diff --git a/web/src/settings_notifications.ts b/web/src/settings_notifications.ts
index b0ec5d1e184..2513bbd580c 100644
--- a/web/src/settings_notifications.ts
+++ b/web/src/settings_notifications.ts
@@ -318,11 +318,11 @@ function reset_stream_notifications(elem: HTMLElement): void {
const sub = sub_store.get(stream_id);
assert(sub !== undefined);
- const html_body = render_confirm_reset_stream_notifications({sub});
+ const modal_content_html = render_confirm_reset_stream_notifications({sub});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Reset to default notifications?"}),
- html_body,
+ modal_content_html,
id: "confirm_reset_stream_notifications_modal",
on_click() {
do_reset_stream_notifications(elem, sub);
@@ -503,12 +503,12 @@ export function set_up(settings_panel: SettingsPanel): void {
}
}
if (enabled_pm_mention_notifications_count === 1) {
- const html_body = render_confirm_disable_all_notifications();
+ const modal_content_html = render_confirm_disable_all_notifications();
$input_elem.prop("checked", user_settings[setting_name]);
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Disable notifications?"}),
- html_body,
+ modal_content_html,
on_click() {
change_notification_setting(
setting_name,
diff --git a/web/src/settings_org.ts b/web/src/settings_org.ts
index 6a5ae5e7414..dcec6f958c6 100644
--- a/web/src/settings_org.ts
+++ b/web/src/settings_org.ts
@@ -1135,7 +1135,7 @@ export function deactivate_organization(e: JQuery.Event): void {
time_unit_choices.pop();
}
- const html_body = render_settings_deactivate_realm_modal({
+ const modal_content_html = render_settings_deactivate_realm_modal({
can_set_data_deletion,
delete_in_options: valid_delete_options,
custom_deletion_input_label: get_custom_deletion_input_text(),
@@ -1145,7 +1145,7 @@ export function deactivate_organization(e: JQuery.Event): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Deactivate organization"}),
help_link: "/help/deactivate-your-organization",
- html_body,
+ modal_content_html,
id: "deactivate-realm-user-modal",
on_click: do_deactivate_realm,
close_on_submit: false,
diff --git a/web/src/settings_playgrounds.ts b/web/src/settings_playgrounds.ts
index 11b76d86eb2..22c35ebdcbc 100644
--- a/web/src/settings_playgrounds.ts
+++ b/web/src/settings_playgrounds.ts
@@ -95,11 +95,11 @@ function build_page(): void {
const url =
"/json/realm/playgrounds/" +
encodeURIComponent($button.closest("tr").attr("data-playground-id")!);
- const html_body = render_confirm_delete_playground();
+ const modal_content_html = render_confirm_delete_playground();
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete code playground?"}),
- html_body,
+ modal_content_html,
id: "confirm_delete_code_playgrounds_modal",
on_click() {
dialog_widget.submit_api_request(channel.del, url, {});
diff --git a/web/src/settings_preferences.ts b/web/src/settings_preferences.ts
index 310a7c91b83..6ca2d5cfe6b 100644
--- a/web/src/settings_preferences.ts
+++ b/web/src/settings_preferences.ts
@@ -104,7 +104,7 @@ function spectator_default_language_modal_post_render(): void {
export function launch_default_language_setting_modal_for_spectator(): void {
const selected_language = user_settings.default_language;
- const html_body = render_dialog_default_language({
+ const modal_content_html = render_dialog_default_language({
language_list: get_language_list_columns(selected_language).toSorted((a, b) =>
util.strcmp(a.name_with_percent, b.name_with_percent),
),
@@ -112,7 +112,7 @@ export function launch_default_language_setting_modal_for_spectator(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Select language"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Close"}),
id: "language_selection_modal",
close_on_submit: true,
diff --git a/web/src/settings_profile_fields.ts b/web/src/settings_profile_fields.ts
index f158579b235..2ce7d06bb8c 100644
--- a/web/src/settings_profile_fields.ts
+++ b/web/src/settings_profile_fields.ts
@@ -174,7 +174,7 @@ function delete_profile_field(this: HTMLElement, e: JQuery.ClickEvent): void {
}
}
assert(profile_field !== undefined);
- const html_body = render_confirm_delete_profile_field({
+ const modal_content_html = render_confirm_delete_profile_field({
profile_field_name: profile_field.name,
count: users_using_deleting_profile_field,
});
@@ -190,7 +190,7 @@ function delete_profile_field(this: HTMLElement, e: JQuery.ClickEvent): void {
}
confirm_dialog.launch({
- html_body,
+ modal_content_html,
html_heading: $t_html({defaultMessage: "Delete custom profile field?"}),
on_click: request_delete,
});
@@ -330,7 +330,7 @@ function open_custom_profile_field_creation_form_modal(): void {
realm.custom_profile_field_types,
).toSorted((a, b) => util.strcmp(a.name, b.name));
- const html_body = render_add_new_custom_profile_field_form({
+ const modal_content_html = render_add_new_custom_profile_field_form({
realm_default_external_accounts: realm.realm_default_external_accounts,
custom_profile_field_types: sorted_custom_profile_field_types,
});
@@ -396,7 +396,7 @@ function open_custom_profile_field_creation_form_modal(): void {
form_id: "add-new-custom-profile-field-form",
help_link: "/help/custom-profile-fields#add-a-custom-profile-field",
html_heading: $t_html({defaultMessage: "Add a new custom profile field"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Add"}),
on_click: create_profile_field,
post_render: initialize_custom_profile_field_form,
@@ -449,7 +449,7 @@ function show_modal_for_deleting_options(
}
}
const deleted_options_count = Object.keys(deleted_values).length;
- const html_body = render_confirm_delete_profile_field_option({
+ const modal_content_html = render_confirm_delete_profile_field_option({
count: users_count_with_deleted_option_selected,
field_name: field.name,
deleted_options_count,
@@ -464,7 +464,7 @@ function show_modal_for_deleting_options(
},
{N: deleted_options_count},
),
- html_body,
+ modal_content_html,
on_click: update_profile_field,
});
}
@@ -604,7 +604,7 @@ function open_custom_profile_field_edit_form_modal(this: HTMLElement): void {
choices = parse_field_choices_from_field_data(select_field_data);
}
- const html_body = render_edit_custom_profile_field_form({
+ const modal_content_html = render_edit_custom_profile_field_form({
profile_field_info: {
id: field.id,
name: field.name,
@@ -737,7 +737,7 @@ function open_custom_profile_field_edit_form_modal(this: HTMLElement): void {
dialog_widget.launch({
form_id: edit_custom_profile_field_form_id,
html_heading: $t_html({defaultMessage: "Edit custom profile field"}),
- html_body,
+ modal_content_html,
id: "edit-custom-profile-field-form-modal",
on_click: submit_form,
post_render: set_initial_values_of_profile_field,
diff --git a/web/src/settings_realm_domains.ts b/web/src/settings_realm_domains.ts
index 968d99280be..963d486b08a 100644
--- a/web/src/settings_realm_domains.ts
+++ b/web/src/settings_realm_domains.ts
@@ -149,7 +149,7 @@ export function show_realm_domains_modal(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Allowed domains"}),
- html_body: realm_domains_table_body,
+ modal_content_html: realm_domains_table_body,
html_submit_button: $t_html({defaultMessage: "Close"}),
id: "realm_domains_modal",
on_click() {
diff --git a/web/src/settings_realm_user_settings_defaults.ts b/web/src/settings_realm_user_settings_defaults.ts
index 5eea7818cbe..92d4bfe3f53 100644
--- a/web/src/settings_realm_user_settings_defaults.ts
+++ b/web/src/settings_realm_user_settings_defaults.ts
@@ -90,7 +90,7 @@ function confirm_resetting_user_setting_to_default(
property_list: string[],
$status_element: JQuery,
): void {
- const html_body = render_confirm_reset_user_configuration();
+ const modal_content_html = render_confirm_reset_user_configuration();
function reset_user_configuration(): void {
const active_human_user_ids = people.get_realm_active_human_user_ids();
@@ -121,7 +121,7 @@ function confirm_resetting_user_setting_to_default(
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Reset user configurations?"}),
- html_body,
+ modal_content_html,
id: "confirm-reset-user-configuration",
on_click: reset_user_configuration,
close_on_submit: false,
diff --git a/web/src/settings_streams.ts b/web/src/settings_streams.ts
index 6b275a0445e..372b8e05927 100644
--- a/web/src/settings_streams.ts
+++ b/web/src/settings_streams.ts
@@ -167,7 +167,7 @@ function delete_choice_row(e: JQuery.ClickEvent): void {
}
function show_add_default_streams_modal(): void {
- const html_body = render_add_default_streams();
+ const modal_content_html = render_add_default_streams();
function add_default_streams(e: JQuery.ClickEvent): void {
e.preventDefault();
@@ -215,7 +215,7 @@ function show_add_default_streams_modal(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Add default channels"}),
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Add"}),
help_link: "/help/set-default-channels-for-new-users",
id: "add-default-stream-modal",
diff --git a/web/src/starred_messages_ui.ts b/web/src/starred_messages_ui.ts
index f6713c96841..94156c8eb75 100644
--- a/web/src/starred_messages_ui.ts
+++ b/web/src/starred_messages_ui.ts
@@ -72,11 +72,11 @@ export function rerender_ui(): void {
}
export function confirm_unstar_all_messages(): void {
- const html_body = render_confirm_unstar_all_messages();
+ const modal_content_html = render_confirm_unstar_all_messages();
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Unstar all messages"}),
- html_body,
+ modal_content_html,
on_click: message_flags.unstar_all_messages,
});
}
@@ -91,7 +91,7 @@ export function confirm_unstar_all_messages_in_topic(stream_id: number, topic: s
return;
}
- const html_body = render_confirm_unstar_all_messages_in_topic({
+ const modal_content_html = render_confirm_unstar_all_messages_in_topic({
stream_name,
topic_display_name: util.get_final_topic_display_name(topic),
is_empty_string_topic: topic === "",
@@ -99,7 +99,7 @@ export function confirm_unstar_all_messages_in_topic(stream_id: number, topic: s
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Unstar messages in topic"}),
- html_body,
+ modal_content_html,
on_click,
});
}
diff --git a/web/src/stream_create.ts b/web/src/stream_create.ts
index f50f61ffd01..5d0004d4b4d 100644
--- a/web/src/stream_create.ts
+++ b/web/src/stream_create.ts
@@ -618,14 +618,14 @@ export function set_up_handlers(): void {
}
if (principals.length >= 50) {
- const html_body = render_subscription_invites_warning_modal({
+ const modal_content_html = render_subscription_invites_warning_modal({
channel_name: stream_name,
count: principals.length,
});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Large number of subscribers"}),
- html_body,
+ modal_content_html,
on_click() {
create_stream();
},
diff --git a/web/src/stream_edit.ts b/web/src/stream_edit.ts
index 2c17a8c7e9d..c4e9034168b 100644
--- a/web/src/stream_edit.ts
+++ b/web/src/stream_edit.ts
@@ -124,7 +124,7 @@ export function open_stream_edit_modal(stream_id: number): void {
: $t_html({defaultMessage: "Edit #{channel_name}"}, {channel_name: stream.name});
dialog_widget.launch({
html_heading: heading,
- html_body: change_stream_info_modal,
+ modal_content_html: change_stream_info_modal,
id: "change_stream_info_modal",
loading_spinner: true,
on_click: save_stream_info,
@@ -686,7 +686,7 @@ function show_stream_email_address_modal(address: string, sub: StreamSubscriptio
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Generate channel email address"}),
- html_body: copy_email_address_modal_html,
+ modal_content_html: copy_email_address_modal_html,
id: "copy_email_address_modal",
html_submit_button: $t_html({defaultMessage: "Generate email address"}),
html_exit_button: $t_html({defaultMessage: "Close"}),
@@ -893,7 +893,7 @@ export function initialize(): void {
is_zulip_update_announcements_stream ||
is_moderation_request_channel;
- const html_body = render_settings_deactivation_stream_modal({
+ const modal_content_html = render_settings_deactivation_stream_modal({
stream_name_with_privacy_symbol_html,
is_moderation_request_channel,
is_new_stream_announcements_stream,
@@ -909,7 +909,7 @@ export function initialize(): void {
),
id: "archive-stream-modal",
help_link: "/help/archive-a-channel",
- html_body,
+ modal_content_html,
on_click: do_archive_stream,
});
@@ -941,7 +941,7 @@ export function initialize(): void {
const stream = sub_store.get(stream_id);
const stream_name_with_privacy_symbol_html = render_inline_decorated_channel_name({stream});
- const html_body = render_settings_reactivation_stream_modal();
+ const modal_content_html = render_settings_reactivation_stream_modal();
confirm_dialog.launch({
html_heading: $t_html(
@@ -949,7 +949,7 @@ export function initialize(): void {
{"z-link": () => stream_name_with_privacy_symbol_html},
),
id: "unarchive-stream-modal",
- html_body,
+ modal_content_html,
on_click: do_unarchive_stream,
});
@@ -1045,7 +1045,7 @@ export function initialize(): void {
}
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Confirm changing access permissions"}),
- html_body: render_confirm_stream_privacy_change_modal(),
+ modal_content_html: render_confirm_stream_privacy_change_modal(),
id: "confirm_stream_privacy_change",
html_submit_button: $t_html({defaultMessage: "Confirm"}),
on_click() {
diff --git a/web/src/stream_edit_subscribers.ts b/web/src/stream_edit_subscribers.ts
index 84fbd2387f8..aeda1a00eeb 100644
--- a/web/src/stream_edit_subscribers.ts
+++ b/web/src/stream_edit_subscribers.ts
@@ -433,7 +433,7 @@ function remove_subscriber({
stream: sub,
});
- const html_body = render_unsubscribe_private_stream_modal({
+ const modal_content_html = render_unsubscribe_private_stream_modal({
unsubscribing_other_user,
organization_will_lose_content_access:
sub_count === 1 &&
@@ -459,7 +459,7 @@ function remove_subscriber({
confirm_dialog.launch({
html_heading,
- html_body,
+ modal_content_html,
on_click: remove_user_from_private_stream,
});
return;
diff --git a/web/src/stream_events.ts b/web/src/stream_events.ts
index ee0b71f3544..524ea757d75 100644
--- a/web/src/stream_events.ts
+++ b/web/src/stream_events.ts
@@ -251,7 +251,7 @@ export function update_property<P extends keyof UpdatableStreamProperties>(
function show_first_stream_created_modal(stream: StreamSubscription): void {
dialog_widget.launch({
html_heading: $t({defaultMessage: "Channel created!"}),
- html_body: render_first_stream_created_modal({stream}),
+ modal_content_html: render_first_stream_created_modal({stream}),
id: "first_stream_created_modal",
on_click(): void {
/* This modal is purely informational and doesn't do anything when closed. */
diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.ts
index 1747873a0d3..c915f40122a 100644
--- a/web/src/stream_popover.ts
+++ b/web/src/stream_popover.ts
@@ -1198,7 +1198,7 @@ export async function build_move_topic_to_stream_popover(
dialog_widget.launch({
html_heading: modal_heading,
- html_body: render_move_topic_to_stream(args),
+ modal_content_html: render_move_topic_to_stream(args),
html_submit_button: $t_html({defaultMessage: "Confirm"}),
id: "move_topic_modal",
form_id: "move_topic_form",
diff --git a/web/src/stream_settings_components.ts b/web/src/stream_settings_components.ts
index 7c5e027130a..2d0c6ced841 100644
--- a/web/src/stream_settings_components.ts
+++ b/web/src/stream_settings_components.ts
@@ -240,7 +240,7 @@ export function unsubscribe_from_private_stream(sub: StreamSubscription): void {
stream: sub,
});
- const html_body = render_unsubscribe_private_stream_modal({
+ const modal_content_html = render_unsubscribe_private_stream_modal({
unsubscribing_other_user: false,
organization_will_lose_content_access:
sub_count === 1 &&
@@ -267,7 +267,7 @@ export function unsubscribe_from_private_stream(sub: StreamSubscription): void {
{defaultMessage: "Unsubscribe from <z-link></z-link>?"},
{"z-link": () => stream_name_with_privacy_symbol_html},
),
- html_body,
+ modal_content_html,
on_click: unsubscribe_from_stream,
});
}
diff --git a/web/src/topic_popover.ts b/web/src/topic_popover.ts
index 0830135db20..96616741626 100644
--- a/web/src/topic_popover.ts
+++ b/web/src/topic_popover.ts
@@ -188,7 +188,7 @@ export function initialize(): void {
});
$popper.one("click", ".sidebar-popover-delete-topic-messages", () => {
- const html_body = render_delete_topic_modal({
+ const modal_content_html = render_delete_topic_modal({
topic_display_name,
is_empty_string_topic,
});
@@ -196,7 +196,7 @@ export function initialize(): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Delete topic"}),
help_link: "/help/delete-a-topic",
- html_body,
+ modal_content_html,
on_click() {
message_delete.delete_topic(stream_id, topic_name);
},
diff --git a/web/src/ui_init.js b/web/src/ui_init.js
index 461164c8b9f..6a91fcdbc98 100644
--- a/web/src/ui_init.js
+++ b/web/src/ui_init.js
@@ -775,10 +775,10 @@ export async function initialize_everything(state_data) {
}
function show_try_zulip_modal() {
- const html_body = render_try_zulip_modal();
+ const modal_content_html = render_try_zulip_modal();
dialog_widget.launch({
text_heading: i18n.$t({defaultMessage: "Welcome to the Zulip development community!"}),
- html_body,
+ modal_content_html,
html_submit_button: i18n.$t({defaultMessage: "Let's go!"}),
on_click() {
// Do nothing
diff --git a/web/src/unread_ops.ts b/web/src/unread_ops.ts
index 8e2c279cd7a..2c50d63afd5 100644
--- a/web/src/unread_ops.ts
+++ b/web/src/unread_ops.ts
@@ -66,11 +66,11 @@ export function is_window_focused(): boolean {
}
export function confirm_mark_messages_as_read(): void {
- const html_body = render_confirm_mark_messages_as_read();
+ const modal_content_html = render_confirm_mark_messages_as_read();
const modal_id = confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Choose messages to mark as read"}),
- html_body,
+ modal_content_html,
on_click() {
handle_mark_messages_as_read(modal_id);
},
@@ -469,7 +469,7 @@ export function mark_as_unread_from_here(message_id: number): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Mark messages as unread?"}),
- html_body: render_confirm_mark_as_unread_from_here(context),
+ modal_content_html: render_confirm_mark_as_unread_from_here(context),
on_click() {
if (prefer_local_ids) {
do_mark_unread(locally_available_matching_message_ids);
diff --git a/web/src/upload_widget.ts b/web/src/upload_widget.ts
index 36fc97cfe12..2d1b4dd6271 100644
--- a/web/src/upload_widget.ts
+++ b/web/src/upload_widget.ts
@@ -188,7 +188,7 @@ function open_uppy_editor(
const rendered_image_editor_modal = render_image_editor_modal();
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Editing {file_name}"}, {file_name: file.name}),
- html_body: rendered_image_editor_modal,
+ modal_content_html: rendered_image_editor_modal,
id: "uppy-editor",
loading_spinner: true,
on_click() {
diff --git a/web/src/user_card_popover.ts b/web/src/user_card_popover.ts
index 488cc2e5171..160cb08d379 100644
--- a/web/src/user_card_popover.ts
+++ b/web/src/user_card_popover.ts
@@ -57,14 +57,14 @@ export function confirm_mute_user(user_id: number): void {
muted_users.mute_user(user_id);
}
- const html_body = render_confirm_mute_user({
+ const modal_content_html = render_confirm_mute_user({
user_name: people.get_full_name(user_id),
});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Mute user"}),
help_link: "/help/mute-a-user",
- html_body,
+ modal_content_html,
on_click,
});
}
diff --git a/web/src/user_deactivation_ui.ts b/web/src/user_deactivation_ui.ts
index 874c5fff1d9..875cc3e0354 100644
--- a/web/src/user_deactivation_ui.ts
+++ b/web/src/user_deactivation_ui.ts
@@ -24,10 +24,10 @@ export function confirm_deactivation(
loading_spinner: boolean,
): void {
if (user_id === current_user.user_id) {
- const html_body = render_confirm_deactivate_own_user();
+ const modal_content_html = render_confirm_deactivate_own_user();
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Deactivate your account"}),
- html_body,
+ modal_content_html,
on_click: handle_confirm,
help_link: "/help/deactivate-your-account",
loading_spinner,
@@ -74,7 +74,7 @@ export function confirm_deactivation(
realm_name,
user_deactivation_actions,
};
- const html_body = render_settings_deactivation_user_modal(opts);
+ const modal_content_html = render_settings_deactivation_user_modal(opts);
function set_email_field_visibility(dialog_widget_id: string): void {
const $modal = $(`#${CSS.escape(dialog_widget_id)}`);
@@ -97,7 +97,7 @@ export function confirm_deactivation(
{name: user.full_name},
),
help_link: "/help/deactivate-or-reactivate-a-user#deactivating-a-user",
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Deactivate"}),
id: "deactivate-user-modal",
on_click: handle_confirm,
@@ -115,12 +115,12 @@ export function confirm_bot_deactivation(
loading_spinner: boolean,
): void {
const bot = people.get_by_user_id(bot_id);
- const html_body = render_settings_deactivation_bot_modal();
+ const modal_content_html = render_settings_deactivation_bot_modal();
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Deactivate {name}?"}, {name: bot.full_name}),
help_link: "/help/deactivate-or-reactivate-a-bot",
- html_body,
+ modal_content_html,
html_submit_button: $t_html({defaultMessage: "Deactivate"}),
on_click: handle_confirm,
loading_spinner,
@@ -141,7 +141,7 @@ export function confirm_reactivation(
username: user.full_name,
};
- let html_body;
+ let modal_content_html;
// check if bot or human
if (user.is_bot) {
if (user.bot_owner_id !== null && !people.is_person_active(user.bot_owner_id)) {
@@ -150,15 +150,15 @@ export function confirm_reactivation(
} else {
opts.original_owner_deactivated = false;
}
- html_body = render_settings_reactivation_bot_modal(opts);
+ modal_content_html = render_settings_reactivation_bot_modal(opts);
} else {
- html_body = render_settings_reactivation_user_modal(opts);
+ modal_content_html = render_settings_reactivation_user_modal(opts);
}
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Reactivate {name}"}, {name: user.full_name}),
help_link: "/help/deactivate-or-reactivate-a-user#reactivating-a-user",
- html_body,
+ modal_content_html,
on_click: handle_confirm,
loading_spinner,
});
diff --git a/web/src/user_group_create.ts b/web/src/user_group_create.ts
index 50b7bded088..72bf38c60a0 100644
--- a/web/src/user_group_create.ts
+++ b/web/src/user_group_create.ts
@@ -335,7 +335,7 @@ export function set_up_handlers(): void {
{defaultMessage: "Rename {group_name} (<i>deactivated</i>)"},
{group_name: user_groups.get_display_group_name(group.name)},
),
- html_body: change_user_group_info_modal,
+ modal_content_html: change_user_group_info_modal,
id: "change_group_info_modal",
loading_spinner: true,
on_click: save_group_info,
diff --git a/web/src/user_group_edit.ts b/web/src/user_group_edit.ts
index 98ef584c4a9..ff9896f147d 100644
--- a/web/src/user_group_edit.ts
+++ b/web/src/user_group_edit.ts
@@ -2013,7 +2013,7 @@ export function initialize(): void {
{defaultMessage: "Edit {group_name}"},
{group_name: user_groups.get_display_group_name(user_group.name)},
),
- html_body: change_user_group_info_modal,
+ modal_content_html: change_user_group_info_modal,
id: "change_group_info_modal",
loading_spinner: true,
on_click: save_group_info,
@@ -2117,13 +2117,13 @@ export function initialize(): void {
}
const group_name = user_groups.get_display_group_name(user_group.name);
- const html_body = render_confirm_deactivate_user_group({
+ const modal_content_html = render_confirm_deactivate_user_group({
group_name,
});
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Deactivate {group_name}?"}, {group_name}),
- html_body,
+ modal_content_html,
on_click: deactivate_user_group,
close_on_submit: false,
loading_spinner: true,
@@ -2245,7 +2245,7 @@ export function initialize(): void {
confirm_dialog.launch({
html_heading: $t_html({defaultMessage: "Join group?"}),
- html_body: render_confirm_join_group_direct_member({
+ modal_content_html: render_confirm_join_group_direct_member({
associated_subgroup_names,
}),
id: "confirm_join_group_direct_member",
diff --git a/web/src/user_group_edit_members.ts b/web/src/user_group_edit_members.ts
index efa84822afc..5a166fedb9e 100644
--- a/web/src/user_group_edit_members.ts
+++ b/web/src/user_group_edit_members.ts
@@ -548,7 +548,7 @@ function remove_member({
}
if (people.is_my_user_id(target_user_id) && !settings_data.can_join_user_group(group_id)) {
- const html_body = render_leave_user_group_modal({
+ const modal_content_html = render_leave_user_group_modal({
message: $t({
defaultMessage: "Once you leave this group, you will not be able to rejoin.",
}),
@@ -559,7 +559,7 @@ function remove_member({
{defaultMessage: "Leave {group_name}"},
{group_name: user_groups.get_display_group_name(group.name)},
),
- html_body,
+ modal_content_html,
on_click: do_remove_user_from_group,
});
return;
diff --git a/web/src/user_profile.ts b/web/src/user_profile.ts
index cd2ba217cf8..5df5bfd3dc5 100644
--- a/web/src/user_profile.ts
+++ b/web/src/user_profile.ts
@@ -862,7 +862,7 @@ export function show_edit_bot_info_modal(user_id: number, $container: JQuery): v
assert(bot.is_bot);
// Extract short_name from email (format: {short_name}-bot@domain)
const short_name = bot.email.split("@")[0]!.slice(0, -4);
- const html_body = render_edit_bot_form({
+ const modal_content_html = render_edit_bot_form({
user_id,
is_active,
is_bot_owner_current_user,
@@ -879,7 +879,7 @@ export function show_edit_bot_info_modal(user_id: number, $container: JQuery): v
realm_bot_domain: realm.realm_bot_domain,
zuliprc: "zuliprc",
});
- $container.append($(html_body));
+ $container.append($(modal_content_html));
let avatar_widget: UploadWidget;
assert(bot.bot_type !== undefined && bot.bot_type !== null);
@@ -1244,7 +1244,7 @@ export function show_edit_user_info_modal(user_id: number, $container: JQuery):
const hide_deactivate_button =
current_user.is_admin && !current_user.is_owner && person.is_owner;
const user_is_only_organization_owner = person.is_owner && people.is_current_user_only_owner();
- const html_body = render_admin_human_form({
+ const modal_content_html = render_admin_human_form({
user_id,
email: person.delivery_email,
full_name: person.full_name,
@@ -1255,7 +1255,7 @@ export function show_edit_user_info_modal(user_id: number, $container: JQuery):
max_user_name_length: people.MAX_USER_NAME_LENGTH,
});
- $container.append($(html_body));
+ $container.append($(modal_content_html));
// Set role dropdown and fields user pills
$("#user-role-select").val(person.role);
if (!current_user.is_owner) {
diff --git a/web/src/user_status_ui.ts b/web/src/user_status_ui.ts
index 56971e8eb51..e8af7b21fa7 100644
--- a/web/src/user_status_ui.ts
+++ b/web/src/user_status_ui.ts
@@ -38,7 +38,7 @@ export function open_user_status_modal(): void {
dialog_widget.launch({
html_heading: $t_html({defaultMessage: "Set status"}),
- html_body: rendered_set_status_overlay,
+ modal_content_html: rendered_set_status_overlay,
html_submit_button: $t_html({defaultMessage: "Save"}),
id: "set-user-status-modal",
loading_spinner: true,
diff --git a/web/templates/dialog_widget.hbs b/web/templates/dialog_widget.hbs
index 59a19c4b6ff..a6a810718f3 100644
--- a/web/templates/dialog_widget.hbs
+++ b/web/templates/dialog_widget.hbs
@@ -18,7 +18,7 @@
</header>
<main class="modal__content {{#if hide_footer}} footer-hidden {{/if}}" data-simplebar data-simplebar-tab-index="-1" {{#if always_visible_scrollbar}}data-simplebar-auto-hide="false"{{/if}}>
<div class="alert" id="dialog_error"></div>
- {{{ body_html }}}
+ {{{ modal_content_html }}}
</main>
{{#unless hide_footer}}
<footer class="modal__footer">