2016-10-06 20:34:07 +02:00
|
|
|
<div id="account-settings" class="settings-section show" data-name="your-account">
|
2017-04-26 04:52:39 +02:00
|
|
|
<div class="alert" id="account-settings-status"></div>
|
|
|
|
<div class="account-settings-form">
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="inline-block">
|
|
|
|
<form class="email-change-form grid">
|
|
|
|
<h3 class="light">{{t "User settings" }}</h3>
|
|
|
|
<div class="input-group user-name-section">
|
|
|
|
<label class="inline-block title">{{t "Email" }}</label>
|
|
|
|
<a id="change_email" {{#unless page_params.realm_email_changes_disabled}}href="#change_email"{{/unless}}>
|
2017-07-17 19:33:58 +02:00
|
|
|
<button type="button" class="button small rounded inline-block" id='email_value'
|
2017-07-05 21:54:58 +02:00
|
|
|
{{#if page_params.realm_email_changes_disabled}} disabled="true" {{/if}}>
|
|
|
|
{{page_params.email}}
|
2017-07-17 19:33:58 +02:00
|
|
|
<i class="fa fa-pencil"></i>
|
2017-07-05 21:54:58 +02:00
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2017-04-26 04:52:39 +02:00
|
|
|
<i class="icon-vector-question-sign change_email_tooltip" {{#unless page_params.realm_email_changes_disabled}}style="display:none" {{/unless}} data-toggle="tooltip"
|
|
|
|
title="{{t 'Changing email addresses has been disabled by your Zulip organization administrators. Contact an administrator for help.' }}"></i>
|
2017-01-20 12:27:38 +01:00
|
|
|
|
2017-07-05 21:54:58 +02:00
|
|
|
<div id="change_email_modal" class="modal hide" tabindex="-1" role="dialog"
|
|
|
|
aria-labelledby="change_email_modal_label" aria-hidden="true">
|
|
|
|
<div class="modal-header">
|
2017-08-23 00:58:22 +02:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>
|
2017-07-05 21:54:58 +02:00
|
|
|
<h3 id="change_email_modal_label">{{t "Change email" }}</h3>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="modal-body">
|
|
|
|
<div class="input-group email_change_container">
|
|
|
|
<label for="email">{{t "Email" }}</label>
|
|
|
|
<input type="text" name="email" value="{{ page_params.email }}" autocomplete="off" />
|
|
|
|
</div>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="modal-footer">
|
2017-07-18 01:39:05 +02:00
|
|
|
<button id='change_email_button' class="button rounded sea-green" data-dismiss="modal">{{t "Change" }}</button>
|
|
|
|
<button class="button white rounded" data-dismiss="modal">{{t "Close" }}</button>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
2016-10-05 02:23:09 +02:00
|
|
|
|
2017-07-31 20:44:52 +02:00
|
|
|
<form action="/json/settings" method="patch"
|
2017-07-05 21:54:58 +02:00
|
|
|
class="form-horizontal your-account-settings">
|
|
|
|
|
|
|
|
<div class="m-10 inline-block grid user-name-parent">
|
|
|
|
<div class="user-name-section inline-block">
|
|
|
|
<div class="input-group" id="name_change_container">
|
|
|
|
<label for="full_name" class="inline-block title">{{t "Full name" }}</label>
|
|
|
|
<input type="text" name="full_name" id="full_name" class="w-200 inline-block" value="{{ page_params.full_name }}" {{#if page_params.realm_name_changes_disabled}}disabled="disabled" {{/if}}/>
|
|
|
|
<i class="icon-vector-question-sign change_name_tooltip" data-toggle="tooltip"
|
|
|
|
{{#unless page_params.realm_name_changes_disabled}}style="display:none" {{/unless}}
|
|
|
|
title="{{t 'Changing your name has been disabled by your Zulip organization administrators. Contact an administrator for help.' }}"/>
|
|
|
|
<div class="warning"></div>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
|
|
|
|
2017-07-05 21:54:58 +02:00
|
|
|
<!-- password start -->
|
2017-10-24 20:59:11 +02:00
|
|
|
{{#if page_params.realm_email_auth_enabled}}
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="input-group" id="pw_change_link">
|
|
|
|
<label for="change_password_button" class="inline-block title">{{t "Password" }}</label>
|
2017-07-07 17:30:22 +02:00
|
|
|
<button class="change_password_button button rounded inline-block input-size" data-dismiss="modal">{{t "Change password" }}</button>
|
2017-07-05 21:54:58 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="pw_change_controls">
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="old_password" class="inline-block title">{{t "Old password" }}</label>
|
|
|
|
<input type="password" autocomplete="off" name="old_password" id="old_password" class="w-200 inline-block" value="" />
|
|
|
|
<div class="warning">
|
|
|
|
<a href="/accounts/password/reset/" class="sea-green" target="_blank">{{t "Forgotten it?" }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="new_password" class="inline-block title">{{t "New password" }}</label>
|
|
|
|
<input type="password" autocomplete="off" name="new_password" id="new_password" class="w-200 inline-block" value=""
|
passwords: Express the quality threshold as guesses required.
The original "quality score" was invented purely for populating
our password-strength progress bar, and isn't expressed in terms
that are particularly meaningful. For configuration and the core
accept/reject logic, it's better to use units that are readily
understood. Switch to those.
I considered using "bits of entropy", defined loosely as the log
of this number, but both the zxcvbn paper and the linked CACM
article (which I recommend!) are written in terms of the number
of guesses. And reading (most of) those two papers made me
less happy about referring to "entropy" in our terminology.
I already knew that notion was a little fuzzy if looked at
too closely, and I gained a better appreciation of how it's
contributed to confusion in discussing password policies and
to adoption of perverse policies that favor "Password1!" over
"derived unusual ravioli raft". So, "guesses" it is.
And although the log is handy for some analysis purposes
(certainly for a graph like those in the zxcvbn paper), it adds
a layer of abstraction, and I think makes it harder to think
clearly about attacks, especially in the online setting. So
just use the actual number, and if someone wants to set a
gigantic value, they will have the pleasure of seeing just
how many digits are involved.
(Thanks to @YJDave for a prototype that the code changes in this
commit are based on.)
2017-10-03 19:48:06 +02:00
|
|
|
data-min-length="{{ page_params.password_min_length }}" data-min-guesses="{{ page_params.password_min_guesses }}" />
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="warning">
|
|
|
|
<div class="progress inline-block" id="pw_strength">
|
|
|
|
<div class="bar bar-danger fade" style="width: 10%;"></div>
|
|
|
|
</div>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label class="inline-block title" for="confirm_password title">{{t "Confirm password" }}</label>
|
|
|
|
<input type="password" autocomplete="off" name="confirm_password" id="confirm_password" class="w-200 inline-block" value="" />
|
|
|
|
</div>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
{{/if}}
|
2016-10-05 02:23:09 +02:00
|
|
|
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="input-group no-border">
|
|
|
|
<label for="" class="inline-block"></label>
|
|
|
|
<button type="submit" class="button rounded w-200 sea-green input-size" name="change_settings">
|
|
|
|
{{t 'Save changes'}}
|
|
|
|
</button>
|
|
|
|
</div>
|
2017-04-26 04:52:39 +02:00
|
|
|
<div class="input-group">
|
2017-07-05 21:54:58 +02:00
|
|
|
<label for="" class="inline-block"></label>
|
|
|
|
<button type="submit" class="button rounded w-200 btn-danger input-size" id="user_deactivate_account_button">
|
|
|
|
{{t 'Deactivate account' }}
|
|
|
|
</button>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-12-02 21:42:11 +01:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2016-12-02 21:42:11 +01:00
|
|
|
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="inline-block user-avatar-section">
|
2017-05-17 19:07:00 +02:00
|
|
|
<h3 class="light">{{t "User avatar" }}</h3>
|
|
|
|
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="inline-block">
|
|
|
|
<img id="user-settings-avatar" src="{{ page_params.avatar_url_medium }}" />
|
|
|
|
<div id="user_avatar_file_input_error" class="text-error"></div>
|
|
|
|
<input type="file" name="user_avatar_file_input" class="notvisible" id="user_avatar_file_input" value="{{t 'Upload avatar' }}" />
|
|
|
|
<div id="upload_avatar_spinner"></div>
|
2016-12-02 21:42:11 +01:00
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
<div class="avatar-controls">
|
|
|
|
<button class="button rounded sea-green w-200 block" id="user_avatar_upload_button">
|
|
|
|
{{t 'Upload new avatar' }}
|
|
|
|
</button>
|
|
|
|
<button class="button rounded btn-danger w-200 m-t-20 block" id="user_avatar_delete_button">
|
|
|
|
{{t 'Delete avatar' }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear-float"></div>
|
2016-10-05 02:23:09 +02:00
|
|
|
|
2017-04-26 04:52:39 +02:00
|
|
|
<div id="deactivate_self_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="deactivation_self_modal_label" aria-hidden="true">
|
|
|
|
<div class="modal-header">
|
2017-08-23 00:58:22 +02:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="{{t 'Close' }}"><span aria-hidden="true">×</span></button>
|
2017-07-11 11:24:51 +02:00
|
|
|
<h3 id="deactivation_self_modal_label">{{t "Deactivate your account" }} </h3>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<p>{{#tr this}}By deactivating your account, you will be logged out immediately.{{/tr}}</p>
|
|
|
|
<p>{{t "Note that any bots that you maintain will be disabled." }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2017-07-07 17:30:22 +02:00
|
|
|
<button class="button" data-dismiss="modal">{{t "Cancel" }}</button>
|
2017-07-18 01:39:05 +02:00
|
|
|
<button class="button btn-danger rounded" id="do_deactivate_self_button">{{t "Deactivate now" }}</button>
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2016-10-13 20:09:32 +02:00
|
|
|
</div>
|
|
|
|
|
2017-06-13 17:57:33 +02:00
|
|
|
<hr class="settings_separator" />
|
|
|
|
|
|
|
|
<div class="form-horizontal" id="api_key_button_box">
|
2017-07-05 21:54:58 +02:00
|
|
|
<h3 class="light">{{t "API key" }}</h3>
|
|
|
|
|
|
|
|
<div class="input-group">
|
2017-06-13 17:57:33 +02:00
|
|
|
<p class="api-key-note">
|
|
|
|
{{#tr this}}
|
2017-07-12 22:22:07 +02:00
|
|
|
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.
|
2017-06-13 17:57:33 +02:00
|
|
|
{{/tr}}
|
|
|
|
</p>
|
|
|
|
<button class="button rounded" id="api_key_button">{{t "Show/change your API key" }}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
<div id="get_api_key_box">
|
2017-06-13 17:57:33 +02:00
|
|
|
<p>{{t "Please re-enter your password to confirm your identity." }}
|
2017-08-29 04:13:15 +02:00
|
|
|
<a href="/accounts/password/reset/" target="_blank">{{t "Never had one? Forgotten it?" }}</a></p>
|
2017-06-13 17:57:33 +02:00
|
|
|
<form action="/json/fetch_api_key" method="post" class="form-horizontal">
|
|
|
|
<div class="control-group">
|
|
|
|
<label for="password" class="control-label">{{t "Current password" }}</label>
|
|
|
|
<input type="password" autocomplete="off"
|
|
|
|
name="password" id="get_api_key_password" value="" />
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
2017-07-17 19:33:58 +02:00
|
|
|
<button type="submit" name="view_api_key"
|
|
|
|
class="button sea-green">{{t 'Get API key' }}</button>
|
2017-06-13 17:57:33 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2017-07-05 21:54:58 +02:00
|
|
|
<div id="show_api_key_box">
|
2017-06-13 17:57:33 +02:00
|
|
|
<p>{{t "Your API key:" }}</p>
|
|
|
|
<p><b><span id="api_key_value"></span></b></p>
|
2017-07-18 01:39:05 +02:00
|
|
|
<button type="submit" class="button white rounded regenerate_api_key">
|
2017-06-13 17:57:33 +02:00
|
|
|
{{t "Generate new API key" }}
|
|
|
|
</button>
|
2017-07-18 01:39:05 +02:00
|
|
|
<a id="download_zuliprc" download="{{zuliprc}}" class="button sea-green">
|
2017-06-13 17:57:33 +02:00
|
|
|
{{t "Download .zuliprc" }}
|
|
|
|
</a>
|
|
|
|
<div id="user_api_key_error text-error">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-04-26 04:52:39 +02:00
|
|
|
</div>
|
2016-10-05 02:23:09 +02:00
|
|
|
</div>
|