Fix Bug 69733 - [LDAP] No option to validate entered data in Password field when configuring LDAP

This commit is contained in:
Alexey Safronov 2024-08-19 12:46:31 +04:00
parent 7bf1b1c5ba
commit 5fc6b7a5fe
2 changed files with 20 additions and 0 deletions

View File

@ -32,6 +32,7 @@ import { HelpButton } from "@docspace/shared/components/help-button";
import { FieldContainer } from "@docspace/shared/components/field-container";
import { ToggleButton } from "@docspace/shared/components/toggle-button";
import LdapFieldComponent from "./LdapFieldComponent";
import { InputSize, InputType } from "@docspace/shared/components/text-input";
const LOGIN = "login",
PASSWORD = "password";
@ -109,6 +110,7 @@ const AuthenticationContainer = ({
isRequired
>
<LdapFieldComponent
isPassword
name={PASSWORD}
type="password"
hasError={errors.password}
@ -117,6 +119,11 @@ const AuthenticationContainer = ({
isDisabled={!isLdapEnabled || isUIDisabled || !authentication}
scale
tabIndex={19}
simpleView
size={InputSize.small}
autoComplete="current-password"
inputType={InputType.password}
isDisableTooltip
/>
</FieldContainer>
</Box>

View File

@ -28,6 +28,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { TextInput } from "@docspace/shared/components/text-input";
import { Textarea } from "@docspace/shared/components/textarea";
import { PasswordInput } from "@docspace/shared/components/password-input";
const LdapFieldComponent = (props) => {
const {
@ -37,6 +38,7 @@ const LdapFieldComponent = (props) => {
setErrorField,
name,
onChange,
isPassword,
...prop
} = props;
@ -68,6 +70,17 @@ const LdapFieldComponent = (props) => {
if (isTextArea)
return <Textarea name={name} onChange={onChangeFn} {...prop} />;
if (isPassword)
return (
<PasswordInput
name={name}
onBlur={onBlur}
onFocus={onFocus}
onChange={onChangeFn}
{...prop}
/>
);
return (
<TextInput
name={name}