Browse Source

Account layout fix.

pull/441/head
Halil ibrahim Kalkan 8 years ago
parent
commit
3c9c77bf59
  1. 10
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs
  2. 8
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/_Layout.cshtml
  3. 2
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/_ViewStart.cshtml

10
modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs

@ -2,6 +2,7 @@
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Account.Web.Settings; using Volo.Abp.Account.Web.Settings;
using Volo.Abp.Identity; using Volo.Abp.Identity;
@ -36,13 +37,8 @@ namespace Volo.Abp.Account.Web.Pages.Account
var user = new IdentityUser(GuidGenerator.Create(), Input.UserName, Input.EmailAddress, CurrentTenant.Id); var user = new IdentityUser(GuidGenerator.Create(), Input.UserName, Input.EmailAddress, CurrentTenant.Id);
var result = await UserManager.CreateAsync(user, Input.Password); (await UserManager.CreateAsync(user, Input.Password)).CheckErrors();
if (!result.Succeeded)
{
throw new NotImplementedException();
}
await UserManager.SetEmailAsync(user, Input.EmailAddress); await UserManager.SetEmailAsync(user, Input.EmailAddress);
await SignInManager.SignInAsync(user, isPersistent: false); await SignInManager.SignInAsync(user, isPersistent: false);

8
modules/account/src/Volo.Abp.Account.Web/Pages/Account/_Layout.cshtml

@ -0,0 +1,8 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@{
Layout = ThemeManager.CurrentTheme.GetAccountLayout();
}
<div class="abp-account-container">
@RenderBody()
</div>

2
modules/account/src/Volo.Abp.Account.Web/Pages/Account/_ViewStart.cshtml

@ -1,5 +1,5 @@
@using Volo.Abp.AspNetCore.Mvc.UI.Theming @using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager @inject IThemeManager ThemeManager
@{ @{
Layout = ThemeManager.CurrentTheme.GetAccountLayout(); Layout = "_Layout";
} }
Loading…
Cancel
Save