Browse Source
* Render gov uk reset view * Pass password reset token * Test password update and sign in * The cop is workingpull/158/head
baarkerlounger
3 years ago
committed by
GitHub
4 changed files with 74 additions and 1 deletions
@ -0,0 +1,31 @@ |
|||||||
|
<% content_for :title, "Reset your password" %> |
||||||
|
|
||||||
|
<% content_for :before_content do %> |
||||||
|
<%= govuk_back_link( |
||||||
|
text: 'Back', |
||||||
|
href: :back, |
||||||
|
) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<%= form_for(@user, as: :user, url: password_path(User), html: { method: :put }) do |f| %> |
||||||
|
<%= f.hidden_field :reset_password_token %> |
||||||
|
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-two-thirds"> |
||||||
|
<h1 class="govuk-heading-l"> |
||||||
|
<%= content_for(:title) %> |
||||||
|
</h1> |
||||||
|
|
||||||
|
<%= f.govuk_password_field :password, |
||||||
|
label: { text: "New password" }, |
||||||
|
hint: @minimum_password_length ? { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." } : nil, |
||||||
|
autocomplete: "new-password" |
||||||
|
%> |
||||||
|
|
||||||
|
<%= f.govuk_password_field :password_confirmation, |
||||||
|
label: { text: "Confirm new password" } |
||||||
|
%> |
||||||
|
|
||||||
|
<%= f.govuk_submit "Update" %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<% end %> |
Loading…
Reference in new issue