Plume/templates/session/password_reset_request.rs.html
Ana Gelez 8ab690001d Replace the input! macro with an Input builder (#646)
* Replace the input! macro with an Input builder

* Use a BTreeMap instead of an HashMap

Followinf @fdb-hiroshima's advice

* Rename Input::to_html to Input::html

To make clippy happy

* Wrap error messages in red paragraphs
2019-08-27 16:50:24 +02:00

20 lines
568 B
HTML

@use template_utils::*;
@use templates::base;
@use routes::session::ResetForm;
@use validator::ValidationErrors;
@(ctx: BaseContext, form: &ResetForm, errors: ValidationErrors)
@:base(ctx, i18n!(ctx.1, "Reset your password"), {}, {}, {
<h1>@i18n!(ctx.1, "Reset your password")</h1>
<form method="POST">
@(Input::new("email", i18n!(ctx.1, "Email"))
.default(&form.email)
.error(&errors)
.set_prop("minlenght", 1)
.input_type("email")
.html(ctx.1))
<input type="submit" value="@i18n!(ctx.1, "Send password reset link")" />
</form>
})