diff --git a/scm-ui/ui-components/src/forms/PasswordConfirmation.tsx b/scm-ui/ui-components/src/forms/PasswordConfirmation.tsx index 2db9a773fc..8d4468be4f 100644 --- a/scm-ui/ui-components/src/forms/PasswordConfirmation.tsx +++ b/scm-ui/ui-components/src/forms/PasswordConfirmation.tsx @@ -34,6 +34,7 @@ type State = { type Props = WithTranslation & { passwordChanged: (p1: string, p2: boolean) => void; passwordValidator?: (p: string) => boolean; + onReturnPressed?: () => void; }; class PasswordConfirmation extends React.Component { @@ -57,7 +58,7 @@ class PasswordConfirmation extends React.Component { } render() { - const { t } = this.props; + const { t, onReturnPressed } = this.props; return (
@@ -78,6 +79,7 @@ class PasswordConfirmation extends React.Component { value={this.state ? this.state.confirmedPassword : ""} validationError={this.state.passwordConfirmationFailed} errorMessage={t("password.passwordConfirmFailed")} + onReturnPressed={onReturnPressed} />
diff --git a/scm-ui/ui-webapp/src/users/components/UserConverter.tsx b/scm-ui/ui-webapp/src/users/components/UserConverter.tsx index cdcd24ffcf..4b2f0f0fa7 100644 --- a/scm-ui/ui-webapp/src/users/components/UserConverter.tsx +++ b/scm-ui/ui-webapp/src/users/components/UserConverter.tsx @@ -94,7 +94,15 @@ const UserConverter: FC = ({ user, fetchUser }) => { } }; - const passwordChangeField = ; + const onReturnPressed = () => { + if (password && passwordValid) { + toInternal(); + } + }; + + const passwordChangeField = ( + + ); const passwordModal = (