2019-02-27 13:29:26 +01:00
|
|
|
@use validator::ValidationErrors;
|
2020-01-21 07:02:03 +01:00
|
|
|
@use crate::template_utils::*;
|
|
|
|
@use crate::templates::base;
|
|
|
|
@use crate::routes::session::NewPasswordForm;
|
2019-02-27 13:29:26 +01:00
|
|
|
|
|
|
|
@(ctx: BaseContext, form: &NewPasswordForm, errors: ValidationErrors)
|
|
|
|
|
|
|
|
@:base(ctx, i18n!(ctx.1, "Reset your password"), {}, {}, {
|
|
|
|
<h1>@i18n!(ctx.1, "Reset your password")</h1>
|
|
|
|
|
|
|
|
<form method="POST">
|
2019-08-27 16:50:24 +02:00
|
|
|
@(Input::new("password", i18n!(ctx.1, "New password"))
|
|
|
|
.default(&form.password)
|
|
|
|
.error(&errors)
|
|
|
|
.set_prop("minlenght", 8)
|
|
|
|
.input_type("password")
|
|
|
|
.html(ctx.1))
|
|
|
|
@(Input::new("password_confirmation", i18n!(ctx.1, "Confirmation"))
|
|
|
|
.default(&form.password_confirmation)
|
|
|
|
.error(&errors)
|
|
|
|
.set_prop("minlenght", 8)
|
|
|
|
.input_type("password")
|
|
|
|
.html(ctx.1))
|
2019-02-27 13:29:26 +01:00
|
|
|
<input type="submit" value="@i18n!(ctx.1, "Update password")" />
|
|
|
|
</form>
|
|
|
|
})
|