Skip to content

Commit

Permalink
Update Admin Users UI FormLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jul 25, 2024
1 parent bcaab02 commit e8465b1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions MyApp/Configure.Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using MyApp.Data;
using MyApp.ServiceModel;
using ServiceStack.Data;
using ServiceStack.Html;
using ServiceStack.OrmLite;

[assembly: HostingStartup(typeof(MyApp.ConfigureAuth))]
Expand All @@ -18,6 +19,20 @@ public void Configure(IWebHostBuilder builder) => builder
options.CredentialsAuth();
options.AdminUsersFeature(feature =>
{
feature.FormLayout =
[
Input.For<ApplicationUser>(x => x.UserName, c => c.FieldsPerRow(2)),
Input.For<ApplicationUser>(x => x.Email, c => {
c.Type = Input.Types.Email;
c.FieldsPerRow(2);
}),
Input.For<ApplicationUser>(x => x.Model, c =>
{
c.FieldsPerRow(2);
}),
Input.For<ApplicationUser>(x => x.ProfilePath)
];
feature.OnBeforeDeleteUser = async (req, userId) =>
{
var dbFactory = req.TryResolve<IDbConnectionFactory>();
Expand Down

0 comments on commit e8465b1

Please sign in to comment.