Skip to content

Commit f713902

Browse files
committed
fix: update wording for locked user error message
Change-Id: I57df6faaa37bafd1fef4800f9832debeaab47ff4
1 parent de6a0de commit f713902

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

resources/js/login/login.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import "./third_party_identity_providers.scss";
3232
const EmailInputForm = ({ value, onValidateEmail, onHandleUserNameChange, disableInput, emailError }) => {
3333

3434
return (
35+
<>
3536
<Paper elevation={0} component="form"
3637
target="_self"
3738
className={styles.paper_root}
@@ -50,7 +51,6 @@ const EmailInputForm = ({ value, onValidateEmail, onHandleUserNameChange, disabl
5051
autoFocus={true}
5152
onChange={onHandleUserNameChange}
5253
error={emailError != ""}
53-
helperText={emailError}
5454
/>
5555
{emailError == "" &&
5656
<Button variant="contained"
@@ -63,6 +63,10 @@ const EmailInputForm = ({ value, onValidateEmail, onHandleUserNameChange, disabl
6363
</Button>
6464
}
6565
</Paper>
66+
{ emailError != "" &&
67+
<p className={styles.error_label} dangerouslySetInnerHTML={{__html: emailError}}></p>
68+
}
69+
</>
6670
);
6771
}
6872

@@ -85,7 +89,8 @@ const PasswordInputForm = ({
8589
forgotPasswordAction,
8690
loginAttempts,
8791
maxLoginFailedAttempts,
88-
userIsActive
92+
userIsActive,
93+
helpAction
8994
}) => {
9095
return (
9196
<form method="post" action={formAction} onSubmit={onAuthenticate} target="_self">
@@ -148,7 +153,7 @@ const PasswordInputForm = ({
148153
return (
149154
<>
150155
<p className={styles.error_label}>
151-
Your account has been locked due to multiple failed login attempts. Please contact support to unlock it.
156+
Your account has been locked due to multiple failed login attempts. Please <a href={helpAction}>contact support</a> to unlock it.
152157
</p>
153158
</>
154159
);
@@ -589,7 +594,7 @@ class LoginPage extends React.Component {
589594

590595
let error = '';
591596
if (response.is_active === false) {
592-
error = 'Your user account is currently inactive. Please contact support for further assistance.';
597+
error = `Your user account is currently locked. Please <a href="${this.props.helpAction}">contact support</a> for further assistance.`;
593598
} else if (response.is_active === true && response.is_verified === false) {
594599
error = 'Your email has not been verified. Please check your inbox or resend the verification email.';
595600
}
@@ -772,7 +777,7 @@ class LoginPage extends React.Component {
772777
/>
773778
}
774779
{
775-
this.state.email_verified === false &&
780+
this.state.user_active === true && this.state.email_verified === false &&
776781
<Button variant="contained"
777782
color="primary"
778783
title="Resend verification email"
@@ -820,6 +825,7 @@ class LoginPage extends React.Component {
820825
loginAttempts={this.props?.loginAttempts}
821826
maxLoginFailedAttempts={this.props?.maxLoginFailedAttempts}
822827
userIsActive={this.props?.user_is_active}
828+
helpAction={this.props.helpAction}
823829
/>
824830
<HelpLinks
825831
userName={this.state.user_name}

0 commit comments

Comments
 (0)