diff options
Diffstat (limited to 'src/pages/sign_ins')
-rw-r--r-- | src/pages/sign_ins/new_page.cr | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pages/sign_ins/new_page.cr b/src/pages/sign_ins/new_page.cr new file mode 100644 index 0000000..1018813 --- /dev/null +++ b/src/pages/sign_ins/new_page.cr @@ -0,0 +1,23 @@ +class SignIns::NewPage < AuthLayout + needs operation : SignInUser + + def content + h1 "Sign In" + render_sign_in_form(@operation) + end + + private def render_sign_in_form(op) + form_for SignIns::Create do + sign_in_fields(op) + submit "Sign In", flow_id: "sign-in-button" + end + link "Reset password", to: PasswordResetRequests::New + text " | " + link "Sign up", to: SignUps::New + end + + private def sign_in_fields(op) + mount Shared::Field, attribute: op.email, label_text: "Email", &.email_input(autofocus: "true") + mount Shared::Field, attribute: op.password, label_text: "Password", &.password_input + end +end |