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.

user-events: Update account settings display if `is_admin` is changed.

Lauryn Menarde7c6f35482b9
diff --git a/frontend_tests/node_tests/user_events.js b/frontend_tests/node_tests/user_events.js
index 58b08807d39..e19d1e4adeb 100644
--- a/frontend_tests/node_tests/user_events.js
+++ b/frontend_tests/node_tests/user_events.js
@@ -11,6 +11,7 @@ const message_live_update = mock_esm("../../static/js/message_live_update");
const settings_account = mock_esm("../../static/js/settings_account", {
update_email() {},
update_full_name() {},
+ update_account_settings_display() {},
});
mock_esm("../../static/js/activity", {
diff --git a/static/js/settings_account.js b/static/js/settings_account.js
index d4813b42c78..ffa90b36530 100644
--- a/static/js/settings_account.js
+++ b/static/js/settings_account.js
@@ -80,6 +80,12 @@ export function update_avatar_change_display() {
}
}
+export function update_account_settings_display() {
+ update_name_change_display();
+ update_email_change_display();
+ update_avatar_change_display();
+}
+
export function update_send_read_receipts_tooltip() {
if (page_params.realm_enable_read_receipts) {
$("#send_read_receipts_label .settings-info-icon").hide();
diff --git a/static/js/user_events.js b/static/js/user_events.js
index 5ea7dd63bcb..912577fbfbf 100644
--- a/static/js/user_events.js
+++ b/static/js/user_events.js
@@ -89,6 +89,7 @@ export const update_person = function update(person) {
settings_profile_fields.maybe_disable_widgets();
settings_streams.maybe_disable_widgets();
settings_realm_user_settings_defaults.maybe_disable_widgets();
+ settings_account.update_account_settings_display();
}
if (