I'm working on ABP framework 7.1 with Angular UI.
I already renamed the Name and Surname properties of the abpUsers table and set them as required as this question
It is running well and smoothly. But now, I want to rename the columns of the UI, Create and Edit user:
Reference image:
Now, it is showing Name
and Surname
instead First Name
and Last Name
, these fields have not had the required indicator *
. And you can also save them without providing value.
I want to do both things:
I tried to do that with ExtensionConfigurator as:
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>(
"FirstName",
property =>
{
property.UI.Lookup.DisplayPropertyName = "First Name";
property.DisplayName = L("::FirstName");
});
});
});
After adding that code, I ran the proxy generator. But it didn't work; it still showed the Name
label instead First Name. How should I do that?
How can I achieve that?
The ObjectExtensionManager only works with extra properties. In your case I think you need to customize it with dynamic forms to mark them as required in the UI. Follow the ABP Documentation -> https://docs.abp.io/en/abp/latest/UI/Angular/Dynamic-Form-Extensions
You can easy override the labels in the language management UI
Or you can also override the values in the json. You can follow this blog post in the ABP blogs to do this -> https://community.abp.io/posts/how-to-override-localization-strings-of-depending-modules-ba1oy03l
Here can you find the module localization json for the identity UI -> https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization