#190 adding reset password page

This commit is contained in:
Hamid Reza Mohammadi 2021-08-19 07:42:48 +04:30
parent 45880c185b
commit 6c669d8486
2 changed files with 104 additions and 0 deletions

View File

@ -0,0 +1,84 @@
@page
@model GanjooRazor.Pages.ResetPasswordModel
@{
Layout = null;
ViewData["Title"] = "فراموشی گذرواژه";
}
<!DOCTYPE html>
<html lang="fa-IR" dir="rtl">
<head>
<meta charset="utf-8" />
<title>@ViewData["Title"]</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link href="/css/p6.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="login">
<div id="login-container">
@if (Model.LoggedIn)
{
<div>
<p>شما پیشتر وارد شده‌اید! برای طی فرایند فراموشی گذرواژه خارج شوید.</p>
</div>
}
else
{
<form method="post" action="/resetpassword?Handler=Phase1">
<table>
<tr>
<td colspan="2">
<p>
لطفاً پست الکترونیکی که با آن ثبت نام کرده‌اید را وارد کنید.
</p>
</td>
</tr>
<tr>
<td>
<span class="inputlabel">پست الکترونیکی: </span>
</td>
<td>
<input type="email" asp-for="SignUpViewModel.Email" placeholder="پست الکترونیکی" />
</td>
</tr>
<tr>
<td colspan="2">
<span class="inputlabel">تصویر امنیتی:</span>
</td>
<td>
<img src="@Model.CaptchaImageUrl" />
<input type="hidden" asp-for="SignUpViewModel.ClientAppName" />
<input type="hidden" asp-for="SignUpViewModel.Language" />
<input type="hidden" asp-for="SignUpViewModel.CallbackUrl" />
<input type="hidden" asp-for="SignUpViewModel.CaptchaImageId" />
</td>
</tr>
<tr>
<td colspan="2">
<p>
عددی را که در تصویر امنیتی بالا می‌بینید در کادر زیر وارد کنید..
</p>
</td>
</tr>
<tr>
<td>
<span class="inputlabel">عدد تصویر امنیتی: </span>
</td>
<td>
<input type="password" asp-for="SignUpViewModel.CaptchaValue" id="password" placeholder="عدد تصویر امنیتی" />
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="submit" id="submit" value="ادامه" /></td>
</tr>
</table>
<div><p style="color:red">@Model.LastError</p></div>
</form>
}
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using RSecurityBackend.Models.Auth.ViewModels;
namespace GanjooRazor.Pages
{
public class ResetPasswordModel : PageModel
{
public bool LoggedIn { get; set; }
public string LastError { get; set; }
public UnverifiedSignUpViewModel SignUpViewModel { get; set; }
public string CaptchaImageUrl { get; set; }
public void OnGet()
{
}
}
}