mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 12:05:52 +01:00
confirm password modal by enter key / fix password link for logged in user
This commit is contained in:
@@ -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<Props, State> {
|
||||
@@ -57,7 +58,7 @@ class PasswordConfirmation extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, onReturnPressed } = this.props;
|
||||
return (
|
||||
<div className="columns is-multiline">
|
||||
<div className="column is-half">
|
||||
@@ -78,6 +79,7 @@ class PasswordConfirmation extends React.Component<Props, State> {
|
||||
value={this.state ? this.state.confirmedPassword : ""}
|
||||
validationError={this.state.passwordConfirmationFailed}
|
||||
errorMessage={t("password.passwordConfirmFailed")}
|
||||
onReturnPressed={onReturnPressed}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user