diff --git a/src/components/password-input/PasswordInput.tsx b/src/components/password-input/PasswordInput.tsx index a1f77bb401..beab92dd19 100644 --- a/src/components/password-input/PasswordInput.tsx +++ b/src/components/password-input/PasswordInput.tsx @@ -8,7 +8,15 @@ import { } from "@patternfly/react-core"; import { EyeIcon, EyeSlashIcon } from "@patternfly/react-icons"; -const PasswordInputBase = ({ innerRef, ...rest }: TextInputProps) => { +type PasswordInputProps = TextInputProps & { + hasReveal?: boolean; +}; + +const PasswordInputBase = ({ + hasReveal = true, + innerRef, + ...rest +}: PasswordInputProps) => { const { t } = useTranslation("common-help"); const [hidePassword, setHidePassword] = useState(true); return ( @@ -18,19 +26,21 @@ const PasswordInputBase = ({ innerRef, ...rest }: TextInputProps) => { type={hidePassword ? "password" : "text"} ref={innerRef} /> - + {hasReveal && ( + + )} ); }; export const PasswordInput = React.forwardRef( - (props: TextInputProps, ref: React.Ref) => ( + (props: PasswordInputProps, ref: React.Ref) => ( } diff --git a/src/user-federation/UserFederationLdapSettings.tsx b/src/user-federation/UserFederationLdapSettings.tsx index b4a975e0e9..0bb31e6e45 100644 --- a/src/user-federation/UserFederationLdapSettings.tsx +++ b/src/user-federation/UserFederationLdapSettings.tsx @@ -298,7 +298,7 @@ export const UserFederationLdapSettings = () => { ]} > - + diff --git a/src/user-federation/ldap/LdapSettingsConnection.tsx b/src/user-federation/ldap/LdapSettingsConnection.tsx index 29a2fc20b2..0c99ca15c3 100644 --- a/src/user-federation/ldap/LdapSettingsConnection.tsx +++ b/src/user-federation/ldap/LdapSettingsConnection.tsx @@ -27,6 +27,7 @@ export type LdapSettingsConnectionProps = { form: UseFormMethods; showSectionHeading?: boolean; showSectionDescription?: boolean; + edit?: boolean; }; const testLdapProperties: Array = [ @@ -43,6 +44,7 @@ export const LdapSettingsConnection = ({ form, showSectionHeading = false, showSectionDescription = false, + edit = false, }: LdapSettingsConnectionProps) => { const { t } = useTranslation("user-federation"); const { t: helpText } = useTranslation("user-federation-help"); @@ -319,6 +321,7 @@ export const LdapSettingsConnection = ({ isRequired >