settings: Extract Onboarding section in realm settings.

The section had gotten too tall, at least when the welcome bot message
was enabled.
This commit is contained in:
Tim Abbott
2025-08-13 13:36:48 -07:00
parent 3e84eaab5d
commit 2eb3e18b63
4 changed files with 18 additions and 9 deletions

View File

@@ -24,8 +24,8 @@ administrators.
{settings_tab|organization-settings} {settings_tab|organization-settings}
1. Under **Automated messages and emails**, enable **Add a custom Welcome Bot 1. Under **Onboarding**, enable **Add a custom Welcome Bot message for
message for new users**. new users**.
1. Under **Message text**, enter a custom welcome message using Zulip's standard 1. Under **Message text**, enter a custom welcome message using Zulip's standard
[Markdown formatting](/help/format-your-message-using-markdown). [Markdown formatting](/help/format-your-message-using-markdown).

View File

@@ -15,7 +15,7 @@ email notifying them about their new Zulip account and how to log in.
{settings_tab|organization-settings} {settings_tab|organization-settings}
1. Under **Automated messages and emails**, toggle 1. Under **Onboarding**, toggle
**Send emails introducing Zulip to new users**. **Send emails introducing Zulip to new users**.
{end_tabs} {end_tabs}

View File

@@ -364,7 +364,7 @@ function disable_create_user_groups_if_on_limited_plan(): void {
} }
export function maybe_store_unsaved_welcome_message_custom_text(): void { export function maybe_store_unsaved_welcome_message_custom_text(): void {
if ($("#org-notifications").find(".save-button[data-status='unsaved']").length === 0) { if ($("#org-onboarding").find(".save-button[data-status='unsaved']").length === 0) {
return; return;
} }

View File

@@ -34,11 +34,6 @@
value_type="number" value_type="number"
custom_classes="decorated-stream-name-dropdown-widget"}} custom_classes="decorated-stream-name-dropdown-widget"}}
{{> settings_checkbox
setting_name="realm_send_welcome_emails"
prefix="id_"
is_checked=realm_send_welcome_emails
label=admin_settings_label.realm_send_welcome_emails}}
{{#if settings_send_digest_emails }} {{#if settings_send_digest_emails }}
{{> settings_checkbox {{> settings_checkbox
setting_name="realm_digest_emails_enabled" setting_name="realm_digest_emails_enabled"
@@ -62,6 +57,15 @@
</select> </select>
</div> </div>
</div>
</div>
<div id="org-onboarding" class="settings-subsection-parent">
<div class="subsection-header">
<h3>{{t "Onboarding" }}</h3>
{{> settings_save_discard_widget section_name="onboarding" }}
</div>
<div class="inline-block organization-settings-parent">
{{> settings_checkbox {{> settings_checkbox
setting_name="realm_enable_welcome_message_custom_text" setting_name="realm_enable_welcome_message_custom_text"
prefix="id_" prefix="id_"
@@ -80,6 +84,11 @@
</div> </div>
</div> </div>
{{> settings_checkbox
setting_name="realm_send_welcome_emails"
prefix="id_"
is_checked=realm_send_welcome_emails
label=admin_settings_label.realm_send_welcome_emails}}
</div> </div>
</div> </div>