File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33using Microsoft . Extensions . Configuration ;
44using System . IO ;
55using cloudscribe . UserProperties . Models ;
6+ using cloudscribe . UserProperties . Services ;
67
78namespace Microsoft . Extensions . DependencyInjection
89{
@@ -114,8 +115,14 @@ IConfiguration config
114115
115116 services . AddCloudscribeLogging ( config ) ;
116117
118+ services . Configure < ProfilePropertySetContainer > ( config . GetSection ( "ProfilePropertySetContainer" ) ) ;
119+ services . AddScoped < TenantProfileOptionsResolver > ( ) ;
120+
121+ services . AddCloudscribeKvpUserProperties ( ) ;
122+
117123 services . AddScoped < cloudscribe . Web . Navigation . INavigationNodePermissionResolver , cloudscribe . Web . Navigation . NavigationNodePermissionResolver > ( ) ;
118124 services . AddScoped < cloudscribe . Web . Navigation . INavigationNodePermissionResolver , cloudscribe . SimpleContent . Web . Services . PagesNavigationNodePermissionResolver > ( ) ;
125+
119126 services . AddCloudscribeCoreMvc ( config ) ;
120127 services . AddCloudscribeCoreIntegrationForSimpleContent ( config ) ;
121128 services . AddSimpleContentMvc ( config ) ;
@@ -124,8 +131,7 @@ IConfiguration config
124131 services . AddMetaWeblogForSimpleContent ( config . GetSection ( "MetaWeblogApiOptions" ) ) ;
125132 services . AddSimpleContentRssSyndiction ( ) ;
126133
127- services . Configure < ProfilePropertySetContainer > ( config . GetSection ( "ProfilePropertySetContainer" ) ) ;
128- services . AddCloudscribeKvpUserProperties ( ) ;
134+
129135
130136 return services ;
131137 }
Original file line number Diff line number Diff line change 1+ @model cloudscribe .Core .Web .ViewModels .SiteUser .UserInfoViewModel
2+ @using cloudscribe .Core .Web
3+ @using Microsoft .Extensions .Options
4+ @using Microsoft .Extensions .Localization
5+ @using cloudscribe .UserProperties .Models
6+ @using cloudscribe .UserProperties .Services
7+ @using cloudscribe .UserProperties
8+ @using cloudscribe .Web .Common .Models
9+ @inject IStringLocalizer <UserPropertyResources > sr
10+ @inject IProfileOptionsResolver customPropsResolver
11+ @{
12+ var props = await customPropsResolver .GetProfileProps ();
13+ }
14+ @foreach ( var p in props .Properties )
15+ {
16+ if (p .VisibleToUserOnProfile )
17+ {
18+ if (p .EditableByUserOnProfile )
19+ {
20+ await Html .RenderPartialAsync (p .EditPartialViewName , p as FormItemDefinition );
21+ }
22+ else
23+ {
24+ await Html .RenderPartialAsync (p .ReadOnlyPartialViewName , p as FormItemDefinition );
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 4343 "RegexValidationExpression" : " " ,
4444 "RegexErrorMessage" : " " ,
4545 "Options" : []
46- }
46+ },
47+ {
48+ "Key" : " DisplayName" ,
49+ "Label" : " Display Name" ,
50+ "EditPartialViewName" : " FormItemInputPartial" ,
51+ "ReadOnlyPartialViewName" : " FormItemLabelPartial" ,
52+ "Tooltip" : " " ,
53+ "DefaultValue" : " " ,
54+ "CssClass" : " displayname" ,
55+ "IconCssClass" : " glyphicon glyphicon-user" ,
56+ "IconOnLeft" : " true" ,
57+ "VisibleOnRegistration" : " true" ,
58+ "VisibleToUserOnProfile" : " true" ,
59+ "EditableByUserOnProfile" : " true" ,
60+ "VisibleOnAdminUserEdit" : " false" ,
61+ "EditableOnAdminUserEdit" : " false" ,
62+ "MaxLength" : " 100" ,
63+ "MaxLengthErrorMessage" : " Display Name has a max length of 100 characters" ,
64+ "Required" : " true" ,
65+ "RequiredErrorMessage" : " Display Name is required" ,
66+ "RegexValidationExpression" : " " ,
67+ "RegexErrorMessage" : " " ,
68+ "Options" : []
69+ },
4770 ]
4871 }
4972 ]
You can’t perform that action at this time.
0 commit comments