Skip to content

Commit

Permalink
[RUBY-2779] updating password hint on password reset page (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
brujeo committed Jan 4, 2024
1 parent 52415bd commit 58216a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
19 changes: 15 additions & 4 deletions app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@
<%= f.hidden_field :reset_password_token %>
<%= f.govuk_password_field :password,
width: "one-half",
label: { text: t(".password.label") },
hint: { text: t(".password.hint") },
autocomplete: "off" %>
width: "one-half",
label: { text: t(".password.label") },
autocomplete: "off" do %>
<span class="govuk-hint">
<%= t(".password.hint.text") %>
<ul class="govuk-list govuk-list--bullet">
<li><%= t(".password.hint.list_item_1") %></li>
<li><%= t(".password.hint.list_item_2") %></li>
<li><%= t(".password.hint.list_item_3") %></li>
<li><%= t(".password.hint.list_item_4") %></li>
<li><%= t(".password.hint.list_item_5") %></li>
<li><%= t(".password.hint.list_item_6") %></li>
</ul>
</span>
<% end %>
<%= f.govuk_password_field :password_confirmation,
width: "one-half",
Expand Down
9 changes: 8 additions & 1 deletion config/locales/devise.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ en:
heading: Change your password
password:
label: "New password"
hint: "14 characters minimum"
hint:
text: "It must:"
list_item_1: "have at least 14 characters"
list_item_2: "include some numbers"
list_item_3: "have a mix of lower and upper case letters"
list_item_4: "not use single dictionary words"
list_item_5: "not use simple substitutions, for example the letter 'O' for zero, the letter 'I' for one"
list_item_6: "not use obvious sequences or repeated characters; for example, '111' or 'abc'"
password_confirmation:
label: "New password confirmation"
submit: "Change my password"
Expand Down

0 comments on commit 58216a7

Please sign in to comment.