Skip to content

Commit

Permalink
add missing minlength attribute on "new password" inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
liamwhite committed Feb 26, 2021
1 parent fad734b commit 7030b02
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/philomena_web/controllers/registration_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defmodule PhilomenaWeb.RegistrationController do
end

def edit(conn, _params) do
render(conn, "edit.html")
render(conn, "edit.html", title: "Account Settings")
end

defp assign_email_and_password_changesets(conn, _opts) do
Expand Down
4 changes: 2 additions & 2 deletions lib/philomena_web/templates/password/edit.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ h1 Reset password
p Oops, something went wrong! Please check the errors below.

.field
= password_input f, :password, class: "input", placeholder: "New password"
= password_input f, :password, class: "input", placeholder: "New password", minlength: 12
= error_tag f, :password

.field
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password"
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password", minlength: 12
= error_tag f, :password_confirmation

div
Expand Down
4 changes: 2 additions & 2 deletions lib/philomena_web/templates/registration/edit.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ h3 Change password
p Oops, something went wrong! Please check the errors below.

.field
= password_input f, :password, class: "input", placeholder: "New password"
= password_input f, :password, class: "input", placeholder: "New password", minlength: 12
= error_tag f, :password

.field
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password"
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password", minlength: 12
= error_tag f, :password_confirmation

.field
Expand Down
4 changes: 2 additions & 2 deletions lib/philomena_web/templates/registration/new.html.slime
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ h1 Register
.fieldlabel
' Pick a good strong password - longer is better! Minimum of 12 characters.
.field
= password_input f, :password, class: "input", placeholder: "Password", required: true
= password_input f, :password, class: "input", placeholder: "Password", required: true, minlength: 12
= error_tag f, :password
.field
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm password", required: true
= password_input f, :password_confirmation, class: "input", placeholder: "Confirm password", required: true, minlength: 12
= error_tag f, :password_confirmation

= render PhilomenaWeb.CaptchaView, "_captcha.html", name: "registration", conn: @conn
Expand Down

0 comments on commit 7030b02

Please sign in to comment.