Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Hide email address if not available in user-edit form.
Sahil Batraaab82d1f168e
diff --git a/static/js/settings_users.js b/static/js/settings_users.jsindex 27d563abffe..c9908c859ac 100644--- a/static/js/settings_users.js+++ b/static/js/settings_users.js@@ -542,15 +542,7 @@ export function show_edit_user_info_modal(user_id, from_user_info_popover, $statreturn;}- let user_email = settings_data.email_for_user_settings(person);- if (!user_email) {- // When email_address_visibility is "Nobody", we still- // want to show the fake email address in the edit form.- //- // We may in the future want to just hide the form field- // for this situation, once we display user IDs.- user_email = person.email;- }+ const user_email = settings_data.email_for_user_settings(person);const html_body = render_admin_human_form({user_id,diff --git a/static/templates/settings/admin_human_form.hbs b/static/templates/settings/admin_human_form.hbsindex d3811e88be1..763d76c2410 100644--- a/static/templates/settings/admin_human_form.hbs+++ b/static/templates/settings/admin_human_form.hbs@@ -5,10 +5,12 @@<label for="full_name">{{t "Full name" }}</label><input type="text" autocomplete="off" name="full_name" value="{{ full_name }}" /></div>+ {{#if email}}<div class="input-group email_change_container"><label for="email">{{t "Email" }}</label><input type="text" autocomplete="off" name="email" value="{{ email }}" readonly/></div>+ {{/if}}<div class="input-group user_id_container"><label for="user_id">{{t "User ID" }}</label><input type="text" autocomplete="off" name="user_id" value="{{ user_id }}" readonly/>