From a6d3f9df8faa6529421c5afa2a14d828ca4c6787 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 8 Feb 2023 09:30:09 +0000 Subject: [PATCH] revert password hint text update (added to cldc-1963 instead) --- app/controllers/auth/passwords_controller.rb | 2 -- app/views/devise/passwords/edit.html.erb | 2 +- app/views/devise/passwords/reset_password.html.erb | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb index e0dda4e02..bd4b119cf 100644 --- a/app/controllers/auth/passwords_controller.rb +++ b/app/controllers/auth/passwords_controller.rb @@ -19,13 +19,11 @@ class Auth::PasswordsController < Devise::PasswordsController self.resource = resource_class.send_reset_password_instructions(resource_params) yield resource if block_given? - @minimum_password_length = Devise.password_length.min respond_with({}, location: after_sending_reset_password_instructions_path_for(resource_name)) end def edit super - @minimum_password_length = Devise.password_length.min @confirmation = params["confirmation"] render "devise/passwords/reset_password" end diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 34137a0d6..94ef6f44c 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -15,7 +15,7 @@ <%= f.govuk_password_field :password, label: { text: "New password" }, - hint: { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." }, + 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, diff --git a/app/views/devise/passwords/reset_password.html.erb b/app/views/devise/passwords/reset_password.html.erb index f38e25809..26ee6f590 100644 --- a/app/views/devise/passwords/reset_password.html.erb +++ b/app/views/devise/passwords/reset_password.html.erb @@ -16,7 +16,7 @@ <%= f.govuk_password_field :password, label: { text: "New password" }, - hint: { text: "Your password must be at least #{@minimum_password_length} characters and hard to guess." }, + 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,