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.

settings_profile_fields: Move set_up_external_account_field inline.

Niloth Pec151c64ca11
diff --git a/web/src/settings_profile_fields.ts b/web/src/settings_profile_fields.ts
index d1c95d2fa83..5217da2e50d 100644
--- a/web/src/settings_profile_fields.ts
+++ b/web/src/settings_profile_fields.ts
@@ -259,7 +259,11 @@ function open_custom_profile_field_form_modal(): void {
function set_up_form_fields(): void {
set_up_select_field();
- set_up_external_account_field();
+
+ $("#profile_field_type, #profile_field_external_accounts_type").on("change", () => {
+ set_up_create_field_form();
+ });
+
clear_form_data();
// If we already have 2 custom profile fields configured to be
@@ -827,16 +831,6 @@ function set_up_select_field(): void {
});
}
-function set_up_external_account_field(): void {
- $("#profile_field_type").on("change", () => {
- set_up_create_field_form();
- });
-
- $("#profile_field_external_accounts_type").on("change", () => {
- set_up_create_field_form();
- });
-}
-
export function get_external_account_link(
field_data: settings_components.ExternalAccountFieldData,
value: string,