password reset workflow changed
This commit is contained in:
parent
2f1e740d5a
commit
410b15c2c4
36 changed files with 1229 additions and 255 deletions
|
@ -36,7 +36,7 @@
|
|||
<button type="submit" class="btn btn-default">Sign in</button>
|
||||
@if (Model.PasswordResetEnabled)
|
||||
{
|
||||
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetEmail)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
|
||||
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetLogin)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetEmailModel
|
||||
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetLoginModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
<div class="container row">
|
||||
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetEmail, FormMethod.Post, new { @class = "user-password-reset-email bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
|
||||
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetLogin, FormMethod.Post, new { @class = "user-password-reset-email bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
|
||||
{
|
||||
<div class="form-group">
|
||||
<h3>@UI.PasswordReset</h3>
|
||||
|
@ -18,6 +18,6 @@
|
|||
@Html.TextBoxFor(x => x.Email, new { @class = "form-control", placeholder = UI.Login })
|
||||
@Html.ValidationMessageFor(x => x.Email)
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">@UI.SendEmail</button>
|
||||
<button type="submit" class="btn btn-default">@UI.Next</button>
|
||||
}
|
||||
</div>
|
|
@ -1,6 +1,6 @@
|
|||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetSmsModel
|
||||
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetPincodeModel
|
||||
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
|
@ -9,7 +9,7 @@
|
|||
@if (Model.IsTokenExist)
|
||||
{
|
||||
<div class="container row">
|
||||
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetSms, FormMethod.Post, new {@class = "user-password-reset-sms bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset"}))
|
||||
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetPincode, FormMethod.Post, new {@class = "user-password-reset-sms bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset"}))
|
||||
{
|
||||
@Html.HiddenFor(x=>x.IsTokenExist)
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
|||
<h3>@UI.PasswordReset</h3>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="@Html.IdFor(x => x.Sms)" class="control-label">@Html.Raw(string.Format(Messages.PasswordResetSmsHintFormat, Html.RouteLink(UI.TryAgain.ToLowerInvariant(), AccountRouteNames.PasswordResetSendSms)))</label>
|
||||
<label for="@Html.IdFor(x => x.Sms)" class="control-label">@Html.Raw(string.Format(Messages.PasswordResetSmsHintFormat, Html.RouteLink(UI.TryAgain.ToLowerInvariant(), AccountRouteNames.PasswordResetPincodeSendOptions)))</label>
|
||||
<div >
|
||||
@Html.TextBoxFor(x => x.Sms, new {@class = "form-control", placeholder = UI.Sms})
|
||||
@Html.TextBoxFor(x => x.Sms, new {@class = "form-control", placeholder = UI.Pincode})
|
||||
@Html.ValidationMessageFor(x => x.Sms)
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,51 @@
|
|||
@using WebsitePanel.WebDav.Core.Extensions
|
||||
@using WebsitePanel.WebDavPortal.Models.Account.Enums
|
||||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetPincodeSendOptionsModel
|
||||
|
||||
@{
|
||||
var indexOf = Model.Email.IndexOf('@');
|
||||
|
||||
var maskedEmail = string.Empty;
|
||||
for (int i = 0; i < indexOf - 1; i++)
|
||||
{
|
||||
maskedEmail += '*';
|
||||
}
|
||||
|
||||
maskedEmail += Model.Email.Substring(indexOf - 1);
|
||||
|
||||
var maskedPhone = string.Empty;
|
||||
for (int i = 0; i < Model.MobileNumber.Count() - 5; i++)
|
||||
{
|
||||
maskedPhone += '*';
|
||||
}
|
||||
|
||||
maskedPhone += Model.MobileNumber.Tail(4);
|
||||
}
|
||||
|
||||
|
||||
<div class="container row">
|
||||
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetPincodeSendOptions, FormMethod.Post, new { @class = "user-password-pincode-send-options bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
|
||||
{
|
||||
<div class="form-group">
|
||||
<h3>@UI.PasswordReset</h3>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<label class="control-label">@UI.SendPincodeTo </label>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Mobile)
|
||||
@maskedPhone (@UI.MobilePhone)
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Email)
|
||||
@maskedEmail (@UI.Email)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">@UI.Send</button>
|
||||
}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue