I want to override the login page, but I don't have the source code for the commercial version. Where can I obtain the commercial version source code? For example, something like this: https://github.com/abpframework/abp/blob/037ef9abe024c03c1f89ab6c933710bcfe3f5c93/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs. Additionally, I want to display tenant information in the user login section. Which page should I override? Something similar to the example shown below.
22 Answer(s)
-
0
Hello ,
Can you please check this document It will help you https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b
Thank you.
-
0
I want to override the login page, but I don't have the source code for the commercial version. Where can I obtain the commercial version source code? For example, something like this:
you can get the source code via CLI
abp get-source ...
Here a CLI command to list all modules
abp list-modules
Additionally, I want to display tenant information in the user login section. Which page should I override? Something similar to the example shown below.
You can add a toolbar to display the current tenant; you don't need to override any page.
https://abp.io/docs/latest/framework/ui/mvc-razor-pages/toolbars -
0
if you are using ABP studio, it's very easy to override the page.
you can check the video to know how to do it.
https://www.youtube.com/watch?v=uYTbGLtxdUE&t=2394s -
0
Hello ,
Can you please check this document It will help you https://gist.github.com/ebicoglu/ce0f0425bab806d0ee1a87d0073af96b
Thank you.
Can I pull the source code of the commercial version?
-
0
-
0
Do you have multiple organizations?
you can check it here and set the default organization
-
0
I have already downloaded the source code of Account Pro through ABP Suite. Now I want to replace the text box for tenants with a dropdown box. Is there any way to configure it?
-
0
Hi
you can override the
TenantSwitchModal
page
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml -
0
ok,thanks
-
0
I cannot find the TenantSwitchModalModel class in the code -
0
Hi
you can override the
TenantSwitchModal
page
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml -
0
Hi
The namespace is
Pages.Abp.MultiTenancy.TenantSwitchModalModel
-
0
Hi
The namespace is
Pages.Abp.MultiTenancy.TenantSwitchModalModel
abp can no longer be found under page -
0
It works for me.
-
0
Now I have completed the rewrite, but when I return to the view, I still jump to the view of TenantSwitchModalModel, but I do not jump to the new view. What should I do to overwrite the original view -
0
Put new
TenantSwitchModal.cshtml
under thePages/Abp/MultiTenancy
folder
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/TenantSwitchModal.cshtml.cs -
0
I cut the file to the folder as you did and now run an exception: Multiple handlers matched. The following handlers matched route data and had all constraints satisfied. Multiple handlers matched. The following handlers matched route data and had all constraints satisfied
-
0
I can't reproduce it
@page @using Microsoft.AspNetCore.Mvc.Localization @using Pages.Abp.MultiTenancy @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form @using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal @using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.Localization @model AbpSolution2.Web.Pages.Abp.MultiTenancy.MyTenantSwitchModalModel @inject IHtmlLocalizer<AbpUiMultiTenancyResource> L @{ Layout = null; } <abp-dynamic-form abp-model="@Model.Input" asp-page="/Abp/MultiTenancy/TenantSwitchModal"> <abp-modal> <abp-modal-header title="@L["SwitchTenant"].Value"> test</abp-modal-header> <abp-modal-body> <abp-form-content /> </abp-modal-body> @* TODO: A "Submit" would be better than "Save"! *@ <abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> </abp-modal> </abp-dynamic-form>
using System.Threading.Tasks; using Microsoft.Extensions.Options; using Pages.Abp.MultiTenancy; using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; namespace AbpSolution2.Web.Pages.Abp.MultiTenancy; [Dependency(ReplaceServices = true)] public class MyTenantSwitchModalModel : TenantSwitchModalModel { public MyTenantSwitchModalModel(ITenantStore tenantStore, ITenantNormalizer tenantNormalizer, IOptions<AbpAspNetCoreMultiTenancyOptions> options) : base(tenantStore, tenantNormalizer, options) { } public override async Task OnGetAsync() { Input = new TenantInfoModel(); Input.Name = "test"; if (CurrentTenant.IsAvailable) { var tenant = await TenantStore.FindAsync(CurrentTenant.GetId()); Input.Name = tenant?.Name; } } }
-
0
I see, let's name the new view TenantSwitchModal, thank you!
Now I want to display the user tenant information in the red-framed picture after the user logs in. I need to rewrite which pages?
-
0
Hi,
you don't need to override any page, just need to add a main toolbar. https://abp.io/docs/latest/framework/ui/mvc-razor-pages/toolbars
-
0
ok,thanks!