settings: Improve wording of "Show API key" modal.

This commit changes the "Show API key" modal to use a more intuitive
description of the user's password field, and also to put the reset password
option, which should be the less common case, at the end.

Fixes: #24506.
This commit is contained in:
Manas Jayaswal 2023-03-09 08:18:37 +05:30 committed by GitHub
parent 010b362b29
commit 3e24a05e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -19,8 +19,8 @@ Anyone with your API key can impersonate you, so be doubly careful with it.
1. Under **API key**, click **Show/change your API key**. 1. Under **API key**, click **Show/change your API key**.
1. Enter your password, and click **Get API key**. If you never had a 1. Enter your password, and click **Get API key**. If you don't know your
password, click **Never had one? Forgotten it?** and follow the password, click **reset it** and follow the
instructions from there. instructions from there.
1. Copy your API key. 1. Copy your API key.

View File

@ -11,16 +11,17 @@
<div id="password_confirmation"> <div id="password_confirmation">
<span class="alert-notification" id="api_key_status"></span> <span class="alert-notification" id="api_key_status"></span>
<div id="api_key_form"> <div id="api_key_form">
<p>{{t "Please re-enter your password to confirm your identity." }} <p>{{t "Please re-enter your password to confirm your identity." }}</p>
<a href="/accounts/password/reset/" target="_blank" rel="noopener noreferrer">
{{t "Never had one? Forgotten it?" }}
</a>
</p>
<div class="password-div"> <div class="password-div">
<label for="password">{{t "Current password" }}</label> <label for="password">{{t "Your password" }}</label>
<input type="password" autocomplete="off" name="password" id="get_api_key_password" value="" /> <input type="password" autocomplete="off" name="password" id="get_api_key_password" value="" />
<i class="fa fa-eye-slash password_visibility_toggle tippy-zulip-tooltip" role="button"></i> <i class="fa fa-eye-slash password_visibility_toggle tippy-zulip-tooltip" role="button"></i>
</div> </div>
<p class="small">
{{#tr}}If you don't know your password, you can <z-link>reset it</z-link>.
{{#*inline "z-link"}}<a href="/accounts/password/reset/" target="_blank" rel="noopener noreferrer">{{> @partial-block}}</a>{{/inline}}
{{/tr}}
</p>
</div> </div>
</div> </div>
<div id="show_api_key"> <div id="show_api_key">