mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
account-settings: Pass password page params to dialog widget.
When the password change form was converted to a dialog widget
modal, in commit f5fbf5f0e0
, the page_params values for
password_min_length and password_min_guesses that were referenced
in the handlebars template `dialog_change_password.hbs` had no
value to set, which meant the password quality bar was no longer
checking the input value against those organization settings.
Passes the page_params values for password_min_length and
password_min_guesses to the html parameter in dialog_widet.launch
for the password change modal so that those values are available
and set when the template is rendered.
This commit is contained in:
committed by
Tim Abbott
parent
126f3b5f47
commit
25fb810d81
@@ -588,7 +588,10 @@ export function set_up() {
|
|||||||
|
|
||||||
dialog_widget.launch({
|
dialog_widget.launch({
|
||||||
html_heading: $t_html({defaultMessage: "Change password"}),
|
html_heading: $t_html({defaultMessage: "Change password"}),
|
||||||
html_body: render_dialog_change_password(),
|
html_body: render_dialog_change_password({
|
||||||
|
password_min_length: page_params.password_min_length,
|
||||||
|
password_min_guesses: page_params.password_min_guesses,
|
||||||
|
}),
|
||||||
html_submit_button: $t_html({defaultMessage: "Change"}),
|
html_submit_button: $t_html({defaultMessage: "Change"}),
|
||||||
loading_spinner: true,
|
loading_spinner: true,
|
||||||
id: "change_password_modal",
|
id: "change_password_modal",
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<div class="field password-div">
|
<div class="field password-div">
|
||||||
<label for="new_password" class="title">{{t "New password" }}</label>
|
<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=""
|
<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 }}" />
|
data-min-length="{{password_min_length}}" data-min-guesses="{{password_min_guesses}}" />
|
||||||
<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 class="progress inline-block" id="pw_strength">
|
<div class="progress inline-block" id="pw_strength">
|
||||||
<div class="bar bar-danger fade" style="width: 10%;"></div>
|
<div class="bar bar-danger fade" style="width: 10%;"></div>
|
||||||
|
Reference in New Issue
Block a user