Fix bug 68262 - Add hint text above the new password input.

This commit is contained in:
Tatiana Lopaeva 2024-07-02 16:01:27 +03:00
parent e8fe57a636
commit c69e321daa
6 changed files with 14 additions and 10 deletions

View File

@ -225,9 +225,7 @@ const ActivateUserForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
className="confirm-input"
@ -257,6 +255,7 @@ const ActivateUserForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAdditional={`${t("AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
// If need copy credentials use t("EmailAndPasswordCopiedToClipboard")
/>
</FieldContainer>

View File

@ -42,6 +42,7 @@ import { getPasswordErrorMessage } from "@docspace/shared/utils/getPasswordError
import PortalLogo from "@docspace/shared/components/portal-logo/PortalLogo";
import withLoader from "../withLoader";
import { StyledPage, StyledBody, StyledContent } from "./StyledConfirm";
import { ALLOWED_PASSWORD_CHARACTERS } from "@docspace/shared/constants";
const ChangePasswordForm = (props) => {
const {
@ -154,9 +155,7 @@ const ChangePasswordForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
simpleView={false}
@ -187,6 +186,7 @@ const ChangePasswordForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAdditional={`${t("AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
/>
</FieldContainer>
</div>

View File

@ -52,6 +52,7 @@ import {
} from "@docspace/shared/utils/common";
import { login } from "@docspace/shared/utils/loginUtils";
import {
ALLOWED_PASSWORD_CHARACTERS,
COOKIE_EXPIRATION_YEAR,
LANGUAGE,
PRODUCT_NAME,
@ -633,9 +634,7 @@ const CreateUserForm = (props) => {
isVertical={true}
labelVisible={false}
hasError={isPasswordErrorShow && !passwordValid}
errorMessage={`${t(
"Common:PasswordLimitMessage",
)}: ${getPasswordErrorMessage(t, settings)}`}
errorMessage={t("Common:IncorrectPassword")}
>
<PasswordInput
simpleView={false}
@ -673,6 +672,7 @@ const CreateUserForm = (props) => {
"Common:PasswordLimitSpecialSymbols",
)}`}
generatePasswordTitle={t("Wizard:GeneratePassword")}
tooltipAdditional={`${t("AllowedCharacters")}: ${ALLOWED_PASSWORD_CHARACTERS}`}
/>
</FieldContainer>

View File

@ -102,6 +102,7 @@ const PasswordInput = React.forwardRef(
tooltipOffsetLeft,
tooltipOffsetTop,
isAutoFocussed,
tooltipAdditional,
}: PasswordInputProps,
ref,
) => {
@ -472,7 +473,7 @@ const PasswordInput = React.forwardRef(
{tooltipPasswordSpecial}
</StyledTooltipItem>
)}
{tooltipAdditional}
{generatePasswordTitle && (
<div className="generate-btn-container">
<Link

View File

@ -187,3 +187,6 @@ export const SDK_SCRIPT_URL =
typeof window !== "undefined"
? `${window.location.origin}/static/scripts/sdk/${SDK_VERSION}/api.js`
: "";
export const ALLOWED_PASSWORD_CHARACTERS =
"a-z, A-Z, 0-9, !\"#%&'()*+,-./:;<=>?@[]^_`{|}";

View File

@ -14,6 +14,7 @@
"AddUsers": "Add users",
"AdvancedFilter": "Search options",
"Alert": "Alert",
"AllowedCharacters": "Allowed characters",
"Anonymous": "Anonymous",
"AnyoneWithLink": "Anyone with the link",
"ApplyButton": "Apply",