fix password input helper text (cover all 3 cases: system-managed user, update password, create a new password); add translations for 'generate password' button

This commit is contained in:
Aine
2024-11-21 21:26:50 +02:00
parent 099e349a90
commit 3731410486
9 changed files with 13 additions and 3 deletions

View File

@@ -391,10 +391,10 @@ const UserPasswordInput = props => {
return (
<>
<PasswordInput {...props} helperText={asManagedUserIsSelected ? "resources.users.helper.modify_managed_user_error" : "resources.users.helper.password"} disabled={asManagedUserIsSelected} />
<PasswordInput {...props} helperText={asManagedUserIsSelected ? "resources.users.helper.modify_managed_user_error" : (record ? "resources.users.helper.password" : "resources.users.helper.create_password")} disabled={asManagedUserIsSelected} />
<Button
variant="outlined"
label="Generate Password"
label="resources.users.action.generate_password"
onClick={generatePassword}
sx={{ marginBottom: "10px" }}
disabled={asManagedUserIsSelected}