mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
settings: Hide email address if not available in user-edit form.
This commit is contained in:
@@ -542,15 +542,7 @@ export function show_edit_user_info_modal(user_id, from_user_info_popover, $stat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let user_email = settings_data.email_for_user_settings(person);
|
const 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 html_body = render_admin_human_form({
|
const html_body = render_admin_human_form({
|
||||||
user_id,
|
user_id,
|
||||||
|
|||||||
@@ -5,10 +5,12 @@
|
|||||||
<label for="full_name">{{t "Full name" }}</label>
|
<label for="full_name">{{t "Full name" }}</label>
|
||||||
<input type="text" autocomplete="off" name="full_name" value="{{ full_name }}" />
|
<input type="text" autocomplete="off" name="full_name" value="{{ full_name }}" />
|
||||||
</div>
|
</div>
|
||||||
|
{{#if email}}
|
||||||
<div class="input-group email_change_container">
|
<div class="input-group email_change_container">
|
||||||
<label for="email">{{t "Email" }}</label>
|
<label for="email">{{t "Email" }}</label>
|
||||||
<input type="text" autocomplete="off" name="email" value="{{ email }}" readonly/>
|
<input type="text" autocomplete="off" name="email" value="{{ email }}" readonly/>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
<div class="input-group user_id_container">
|
<div class="input-group user_id_container">
|
||||||
<label for="user_id">{{t "User ID" }}</label>
|
<label for="user_id">{{t "User ID" }}</label>
|
||||||
<input type="text" autocomplete="off" name="user_id" value="{{ user_id }}" readonly/>
|
<input type="text" autocomplete="off" name="user_id" value="{{ user_id }}" readonly/>
|
||||||
|
|||||||
Reference in New Issue
Block a user