Complete reset password flow

This commit is contained in:
2023-10-13 14:07:38 +02:00
parent d5c5185351
commit 60671d5865
25 changed files with 943 additions and 46 deletions

View File

@@ -0,0 +1,27 @@
use maud::{html, Markup};
#[derive(Debug, Clone, Default)]
pub struct ForgotPasswordFormProps {
pub email: Option<String>,
pub email_error: Option<String>,
}
pub fn forgot_password_form(props: ForgotPasswordFormProps) -> Markup {
let ForgotPasswordFormProps { email, email_error } = props;
html! {
form action="forgot-password" method="post" class="auth-form-grid" {
label for="email" { "Email" }
input
type="email"
name="email"
id="email"
placeholder="Email"
value=(email.unwrap_or_default())
required;
@if let Some(email_error) = email_error {
span class="error" { (email_error) }
}
button type="submit" { "Send password reset email" }
}
}
}