-
Notifications
You must be signed in to change notification settings - Fork 12
Customization
Use the AccountConfiguration class to customize the behavior of MvcAccount. See the Installation Instructions for more info.
To use a 2 column tabular display for the forms use this CSS:
.MvcAccount form > div { display: table-row; }
.MvcAccount form > div > div { display: table-cell; padding: .2em .5em; }
.MvcAccount form > div.buttons > div { padding-top: 1em; }
To use a colon after the label text use this:
.MvcAccount form label[for]:after { content: ":"; }
You can customize a specific view using a CSS class named like the view model, but hyphen-separated:
.MvcAccount-Web-Auth-SignInViewModel form > div > div:first-child { text-align: right; }
MvcAccount includes all Razor views embedded as assembly resources. Embedded views can be individually overridden by files views in your project.
To extract all views use the Extract-Views command, using the same value of baseRoute
(used at registration) for the -ViewsDirectory
parameter.
You can override individual resources, like error messages, display names, text in HTML elements like <h1>
and <title>
, for any particular culture, by using global resource files. Here's how it works:
- Create a resource file in
~/App_GlobalResources
. - Set AccountConfiguration.ResourceClassKey to the name of the resource file, minus the culture and extension.
For a list of resource names see this.