diff --git a/apps/web/pages/v2/settings/security/password.tsx b/apps/web/pages/v2/settings/security/password.tsx index b7d0b26056..7bc2673b89 100644 --- a/apps/web/pages/v2/settings/security/password.tsx +++ b/apps/web/pages/v2/settings/security/password.tsx @@ -7,7 +7,7 @@ import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import Button from "@calcom/ui/v2/core/Button"; import Meta from "@calcom/ui/v2/core/Meta"; -import { Form, TextField } from "@calcom/ui/v2/core/form/fields"; +import { Form, PasswordField } from "@calcom/ui/v2/core/form/fields"; import { getLayout } from "@calcom/ui/v2/core/layouts/SettingsLayout"; import showToast from "@calcom/ui/v2/core/notifications"; @@ -48,7 +48,7 @@ const PasswordView = () => { return ( <> - + {user && user.identityProvider !== IdentityProvider.CAL ? (
@@ -65,22 +65,17 @@ const PasswordView = () => {

) : ( - form={formMethods} handleSubmit={handleSubmit}> +
- +
- +

- + Password must be at least at least 7 characters, mix of uppercase & lowercase letters, and contain at least 1 number @@ -89,8 +84,8 @@ const PasswordView = () => { diff --git a/packages/ui/v2/core/form/fields.tsx b/packages/ui/v2/core/form/fields.tsx index b7c3de356d..74c08735f3 100644 --- a/packages/ui/v2/core/form/fields.tsx +++ b/packages/ui/v2/core/form/fields.tsx @@ -166,14 +166,14 @@ type InputFieldProps = { const InputField = forwardRef(function InputField(props, ref) { const id = useId(); - const { t: _t, isLocaleReady } = useLocale(); + const { t: _t, isLocaleReady, i18n } = useLocale(); const t = props.t || _t; const name = props.name || ""; const { label = t(name), labelProps, labelClassName, - placeholder = isLocaleReady ? t(name + "_placeholder") : "", + placeholder = isLocaleReady && i18n.exists(name + "_placeholder") ? t(name + "_placeholder") : "", className, addOnLeading, addOnSuffix, @@ -187,12 +187,6 @@ const InputField = forwardRef(function InputF ...passThrough } = props; - const translatedPlaceholder = isLocaleReady - ? !placeholder?.endsWith("_placeholder") - ? placeholder - : "" - : ""; - return (

{!!name && ( @@ -228,7 +222,7 @@ const InputField = forwardRef(function InputF
(function InputF />
) : ( - + )} {hint &&
{hint}
}