Set the selected locale to default realm locale when creating a user (#27163)

* fix: set the selected locale to default realm locale when creating a user

Signed-off-by: Peter Keuter <github@peterkeuter.nl>

* Update js/apps/admin-ui/src/user/CreateUser.tsx

Co-authored-by: Erik Jan de Wit <edewit@redhat.com>
Signed-off-by: Peter Keuter <github@peterkeuter.nl>

* fix: check if defaultLocale is set

Signed-off-by: Peter Keuter <github@peterkeuter.nl>

* chore: implement proposed change

Signed-off-by: Peter Keuter <github@peterkeuter.nl>

---------

Signed-off-by: Peter Keuter <github@peterkeuter.nl>
Co-authored-by: Erik Jan de Wit <edewit@redhat.com>
This commit is contained in:
Peter Keuter 2024-02-26 09:19:29 +01:00 committed by GitHub
parent a2343740c8
commit fb262a05d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,6 +44,7 @@ export default function CreateUser() {
} }
setRealm(realm); setRealm(realm);
form.setValue("attributes.locale", realm.defaultLocale || "");
setUserProfileMetadata(userProfileMetadata); setUserProfileMetadata(userProfileMetadata);
}, },
[], [],