diff --git a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor index 2a625f3e35..842201df2d 100644 --- a/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor +++ b/modules/account/src/Volo.Abp.Account.Blazor/Pages/Account/AccountManage.razor @@ -1,8 +1,11 @@ @page "/account/manage-profile" -@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.AspNetCore.Components.Forms @using Volo.Abp.Account.Localization @using Volo.Abp.AspNetCore.Components.Web @using Volo.Abp.BlazoriseUI.Components.ObjectExtending +@using Volo.Abp.ObjectExtending +@using Volo.Abp.Data + @inject AbpBlazorMessageLocalizerHelper LH @inherits AbpAccountComponentBase @@ -20,15 +23,15 @@ @L["DisplayName:CurrentPassword"] - + @L["DisplayName:NewPassword"] - + @L["DisplayName:NewPasswordConfirm"] - + @@ -42,27 +45,57 @@ @L["DisplayName:UserName"] - + @L["DisplayName:Name"] - + @L["DisplayName:Surname"] - + @L["DisplayName:Email"] - + @L["DisplayName:PhoneNumber"] - + - + + @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) + { + var isAllowed = propertyInfo.Configuration.GetOrDefault(IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit); + + if (isAllowed == null || !isAllowed.Equals(true)) + { + continue; + } + + if (!propertyInfo.Name.EndsWith("_Text")) + { + if (propertyInfo.Type.IsEnum) + { + + } + else if (!propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + var inputType = propertyInfo.GetInputType(); + __builder.OpenComponent(0, inputType.MakeGenericType(new[] { typeof(PersonalInfoModel), typeof(AccountResource) })); + __builder.AddAttribute(1, "PropertyInfo", propertyInfo); + __builder.AddAttribute(2, "Entity", PersonalInfoModel); + __builder.AddAttribute(3, "LH", LH); + __builder.CloseComponent(); + } + } + }