diff options
Diffstat (limited to 'src/pages/password_resets/new_page.cr')
-rw-r--r-- | src/pages/password_resets/new_page.cr | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pages/password_resets/new_page.cr b/src/pages/password_resets/new_page.cr new file mode 100644 index 0000000..16a6635 --- /dev/null +++ b/src/pages/password_resets/new_page.cr @@ -0,0 +1,18 @@ +class PasswordResets::NewPage < AuthLayout + needs operation : ResetPassword + needs user_id : Int64 + + def content + h1 "Reset your password" + render_password_reset_form(@operation) + end + + private def render_password_reset_form(op) + form_for PasswordResets::Create.with(@user_id) do + mount Shared::Field, attribute: op.password, label_text: "Password", &.password_input(autofocus: "true") + mount Shared::Field, attribute: op.password_confirmation, label_text: "Confirm Password", &.password_input + + submit "Update Password", flow_id: "update-password-button" + end + end +end |