mirror of https://github.com/abpframework/abp.git
4 changed files with 64 additions and 2 deletions
@ -0,0 +1,30 @@ |
|||||
|
@page "/Account/LockedOut" |
||||
|
@model Volo.Abp.Account.Web.Pages.Account.LockedOut |
||||
|
@using Volo.Abp.Account.Localization |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.Identity.Settings |
||||
|
@using Volo.Abp.Settings |
||||
|
@inject IHtmlLocalizer<AccountResource> L |
||||
|
@inject Volo.Abp.AspNetCore.Mvc.UI.Layout.IPageLayout PageLayout |
||||
|
@inject ISettingProvider SettingProvider |
||||
|
@{ |
||||
|
PageLayout.Content.Title = L["LockedOut"].Value; |
||||
|
var requireConfirmedEmail = await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedEmail); |
||||
|
var requireConfirmedPhoneNumber = await SettingProvider.IsTrueAsync(IdentitySettingNames.SignIn.RequireConfirmedPhoneNumber); |
||||
|
bool isAccountDisabled = requireConfirmedEmail || requireConfirmedPhoneNumber; |
||||
|
|
||||
|
} |
||||
|
<abp-card> |
||||
|
<abp-card-body> |
||||
|
@if (isAccountDisabled) |
||||
|
{ |
||||
|
<abp-card-title>@L["AccountDisabledTitle"]</abp-card-title> |
||||
|
<abp-card-text>@L["LoginIsNotAllowed"]</abp-card-text> |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
<abp-card-title>@L["AccountLockedOutTitle"]</abp-card-title> |
||||
|
<abp-card-text>@L["AccountLockedOutText"]</abp-card-text> |
||||
|
} |
||||
|
</abp-card-body> |
||||
|
</abp-card> |
||||
@ -0,0 +1,18 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace Volo.Abp.Account.Web.Pages.Account |
||||
|
{ |
||||
|
public class LockedOut : AccountPageModel |
||||
|
{ |
||||
|
public virtual Task<IActionResult> OnGetAsync() |
||||
|
{ |
||||
|
return Task.FromResult<IActionResult>(Page()); |
||||
|
} |
||||
|
|
||||
|
public virtual Task<IActionResult> OnPostAsync() |
||||
|
{ |
||||
|
return Task.FromResult<IActionResult>(Page()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue