mirror of https://github.com/zulip/zulip.git
151 lines
9.3 KiB
Handlebars
151 lines
9.3 KiB
Handlebars
<div id="account-settings" class="settings-section show" data-name="account-and-privacy">
|
|
<div class="alert" id="dev-account-settings-status"></div>
|
|
<div class="account-settings-form">
|
|
<div class="inline-block">
|
|
<div id="user_details_section">
|
|
<h3 class="inline-block">{{t "Account" }}</h3>
|
|
<form class="email-change-form grid">
|
|
<div class="alert-notification" id="account-settings-status"></div>
|
|
<div class="input-group">
|
|
<label class="inline-block title">{{t "Email" }}</label>
|
|
<button id='change_email' type="button" class="button btn-link small rounded inline-block"
|
|
{{#if (and page_params.realm_email_changes_disabled (not page_params.is_admin))}}disabled="disabled"{{/if}}>
|
|
{{page_params.delivery_email}}
|
|
<i class="fa fa-pencil"></i>
|
|
</button>
|
|
<i class="tippy-zulip-tooltip fa fa-question-circle change_email_tooltip settings-info-icon" {{#if (or (not page_params.realm_email_changes_disabled) page_params.is_admin)}}style="display: none;"{{/if}} data-tippy-content="{{t 'Email address changes are disabled in this organization.' }}"></i>
|
|
</div>
|
|
|
|
<div id="change_email_modal" class="modal modal-bg hide fade" tabindex="-1" role="dialog"
|
|
aria-labelledby="change_email_modal_label" aria-hidden="true">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>
|
|
<h3 class="inline-block" id="change_email_modal_label">{{t "Change email" }}</h3>
|
|
<div class="alert-notification change_email_info"></div>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="input-group email_change_container">
|
|
<label for="email">{{t "New email" }}</label>
|
|
<input type="text" name="email" value="{{ page_params.delivery_email }}" autocomplete="off" spellcheck="false" autofocus="autofocus"/>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="button white rounded" type="button" data-dismiss="modal">{{t "Cancel" }}</button>
|
|
<button id='change_email_button' class="button rounded sea-green" data-dismiss="modal">{{t "Change" }}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
{{#if page_params.two_fa_enabled }}
|
|
<p for="two_factor_auth" class="inline-block title">
|
|
{{t "Two factor authentication" }}: {{#if page_params.two_fa_enabled_user }}{{t "Enabled" }}{{else}}{{t "Disabled" }}{{/if}}
|
|
<a target="_blank" rel="noopener noreferrer" id="two_factor_auth" href="/account/two_factor/" title="{{t 'Set up two factor authentication' }}">[{{t "Setup" }}]</a>
|
|
</p>
|
|
{{/if}}
|
|
|
|
<form class="password-change-form grid">
|
|
{{#if page_params.realm_email_auth_enabled}}
|
|
<div>
|
|
<label class="inline-block title">{{t "Password" }}</label>
|
|
<div class="input-group inline-block" id="pw_change_link">
|
|
<button id="change_password" type="button" class="change_password_button btn-link small button rounded inline-block" data-dismiss="modal">********<i class="fa fa-pencil"></i></button>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div id="change_password_modal" class="modal modal-bg hide fade" tabindex="-1" role="dialog"
|
|
aria-labelledby="change_password_modal_label" aria-hidden="true">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>
|
|
<h3 class="inline-block" id="change_password_modal_label">{{t "Change password" }}</h3>
|
|
<div class="alert-notification change_password_info"></div>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="field password-div">
|
|
<label for="old_password" class="title">{{t "Old password" }}</label>
|
|
<input type="password" autocomplete="off" name="old_password" id="old_password" class="w-200 inline-block" value="" />
|
|
<i class="fa fa-eye-slash password_visibility_toggle tippy-zulip-tooltip" role="button"></i>
|
|
<div class="settings-forgot-password">
|
|
<a href="/accounts/password/reset/" class="sea-green" target="_blank" rel="noopener noreferrer">{{t "Forgotten it?" }}</a>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="field password-div">
|
|
<label for="new_password" class="title">{{t "New password" }}</label>
|
|
<input type="password" autocomplete="new-password" name="new_password" id="new_password" class="w-200 inline-block" value=""
|
|
data-min-length="{{ page_params.password_min_length }}" data-min-guesses="{{ page_params.password_min_guesses }}" />
|
|
<i class="fa fa-eye-slash password_visibility_toggle tippy-zulip-tooltip" role="button"></i>
|
|
<div class="progress inline-block" id="pw_strength">
|
|
<div class="bar bar-danger fade" style="width: 10%;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="button white rounded" type="button" data-dismiss="modal">{{t "Cancel" }}</button>
|
|
<button id='change_password_button' class="button rounded sea-green">{{t "Change" }}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="input-group">
|
|
<button type="submit" class="button rounded btn-danger" id="user_deactivate_account_button">
|
|
{{t 'Deactivate account' }}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-horizontal" id="privacy_settings_box">
|
|
<h3 class="inline-block">{{t "Privacy" }}</h3>
|
|
<div class="alert-notification privacy-setting-status"></div>
|
|
<div class="input-group">
|
|
{{> settings_checkbox
|
|
setting_name="presence_enabled"
|
|
is_checked=settings_object.presence_enabled
|
|
label=settings_label.presence_enabled
|
|
help_link="/help/status-and-availability"
|
|
prefix="user_"}}
|
|
{{> settings_checkbox
|
|
setting_name="send_private_typing_notifications"
|
|
is_checked=settings_object.send_private_typing_notifications
|
|
label=settings_label.send_private_typing_notifications
|
|
}}
|
|
{{#if page_params.development_environment }}
|
|
{{> settings_checkbox
|
|
setting_name="send_stream_typing_notifications"
|
|
is_checked=settings_object.send_stream_typing_notifications
|
|
label=settings_label.send_stream_typing_notifications
|
|
}}
|
|
{{> settings_checkbox
|
|
setting_name="send_read_receipts"
|
|
is_checked=settings_object.send_read_receipts
|
|
label=settings_label.send_read_receipts
|
|
}}
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="settings_separator" />
|
|
|
|
<div class="form-horizontal" id="api_key_button_box">
|
|
<h3>{{t "API key" }}</h3>
|
|
|
|
<div class="input-group">
|
|
<p class="api-key-note">
|
|
{{#tr}}
|
|
An API key can be used to programmatically access a Zulip account.
|
|
Anyone with access to your API key has the ability to read your messages, send
|
|
messages on your behalf, and otherwise impersonate you on Zulip, so you should
|
|
guard your API key as carefully as you guard your password. <br />
|
|
We recommend creating bots and using the bots' accounts and API keys to access
|
|
the Zulip API, unless the task requires access to your account.
|
|
{{/tr}}
|
|
</p>
|
|
<button class="button rounded" id="api_key_button">{{t "Show/change your API key" }}</button>
|
|
</div>
|
|
</div>
|
|
<!-- Render /settings/api_key_modal.hbs after #api_key_button is clicked
|
|
to avoid password being inserted by password manager too aggressively. -->
|
|
</div>
|
|
</div>
|