From c0ee8748179e173657c17f29c7f2b291507a233d Mon Sep 17 00:00:00 2001 From: Ahmet Date: Wed, 30 Sep 2020 23:23:37 +0300 Subject: [PATCH] Added returnUrl to Manage Account page --- .../Volo/Abp/Account/Localization/Resources/en.json | 3 ++- .../Volo/Abp/Account/Localization/Resources/tr.json | 4 +++- .../Volo.Abp.Account.Web/Pages/Account/Manage.cshtml | 11 +++++++++++ .../Pages/Account/Manage.cshtml.cs | 4 ++++ .../MyCompanyName.MyProjectName.Blazor.csproj | 1 - .../MyProjectNameBlazorModule.cs | 2 -- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index 85bd040d8c..51abf72a1e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -55,6 +55,7 @@ "GoToTheApplication": "Go to the application", "BackToLogin": "Back to login", "ProfileTab:Password": "Change password", - "ProfileTab:PersonalInfo": "Personal info" + "ProfileTab:PersonalInfo": "Personal info", + "ReturnToApplication": "Return to application" } } diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index c9aff72675..48e43fd6cc 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -44,6 +44,7 @@ "LoggedOutTitle": "Çıkış Yaptınız", "LoggedOutText": "Çıkış yaptınız ve birazdan yönlendirileceksiniz.", "ReturnToText": "{0} uygulamasına dönmek için tıklayın.", + "OrLoginWith": "Veya bunlarla giriş yap;", "ForgotPassword": "Şifremi unuttum", "SendPasswordResetLink_Information": "E-posta adresinize bir şifre sıfırlama bağlantısı gönderilecektir. Birkaç dakika içerisinde bir e-posta almazsanız lütfen tekrar deneyin.", "PasswordResetMailSentMessage": "E-posta adresinize bir şifre sıfırlama bağlantısı gönderilmiştir. Lütfen e-posta adresinizi kontrol ediniz. Eğer 15 dakika içinde, bu e-postayı gelen kutusunda bulamazsanız, gereksiz veya istenmeyen e-posta kutularına bakınız.", @@ -54,6 +55,7 @@ "GoToTheApplication": "Uygulamaya git", "BackToLogin": "Girişe dön", "ProfileTab:Password": "Şifre değiştir", - "ProfileTab:PersonalInfo": "Kişisel bilgiler" + "ProfileTab:PersonalInfo": "Kişisel bilgiler", + "ReturnToApplication": "Uygulamaya geri dön" } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml index ff6262f3ec..ec48e5bcde 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml @@ -13,6 +13,17 @@ } +@if (!Model.ReturnUrl.IsNullOrWhiteSpace()) +{ + + + + @L["ReturnToApplication"] + + + +} +e
diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs index f7b08eb6c4..b48a20a545 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Manage.cshtml.cs @@ -10,6 +10,10 @@ namespace Volo.Abp.Account.Web.Pages.Account { public class ManageModel : AccountPageModel { + [HiddenInput] + [BindProperty(SupportsGet = true)] + public string ReturnUrl { get; set; } + public ProfileManagementPageCreationContext ProfileManagementPageCreationContext { get; private set; } protected ProfileManagementPageOptions Options { get; } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index c716843c19..cba18ad1bd 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -19,7 +19,6 @@ - diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs index 80174dec40..7554ae8aca 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs @@ -14,7 +14,6 @@ using Volo.Abp.Autofac.WebAssembly; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.Identity.Blazor; -using Volo.Abp.Account.Blazor; using Volo.Abp.AutoMapper; using Volo.Abp.TenantManagement.Blazor; @@ -25,7 +24,6 @@ namespace MyCompanyName.MyProjectName.Blazor typeof(MyProjectNameHttpApiClientModule), typeof(AbpAspNetCoreComponentsWebAssemblyBasicThemeModule), typeof(AbpIdentityBlazorModule), - typeof(AbpAccountBlazorModule), typeof(AbpTenantManagementBlazorModule) )] public class MyProjectNameBlazorModule : AbpModule