websitepanel/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetPincodeSendOptions.cshtml
2015-04-30 05:48:32 -07:00

55 lines
1.9 KiB
Text

@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="radio">
<label for="mobile-radio">
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Mobile, new { id = "mobile-radio" })
@UI.MobilePhone: @maskedPhone
</label>
</div>
<div class="radio">
<label for="email-radio">
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Email, new { id = "email-radio" })
@UI.Email: @maskedEmail
</label>
</div>
</div>
<button type="submit" class="btn btn-default">@UI.Send</button>
}
</div>