diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx index 7f1a08c33c10..6d14a7c46ccf 100644 --- a/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx +++ b/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx @@ -1,19 +1,40 @@ -import { useFormContext } from 'react-hook-form'; +import { AgreeToTermsPolicy } from '@logto/schemas'; +import { Controller, useFormContext } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; import Card from '@/ds-components/Card'; +import DynamicT from '@/ds-components/DynamicT'; import FormField from '@/ds-components/FormField'; +import Select from '@/ds-components/Select'; import TextInput from '@/ds-components/TextInput'; import { uriValidator } from '@/utils/validator'; import type { SignInExperienceForm } from '../../types'; import FormSectionTitle from '../components/FormSectionTitle'; +const agreeToTermsPolicyOptions = [ + { + value: AgreeToTermsPolicy.AutoAgree, + title: , + }, + { + value: AgreeToTermsPolicy.RegistrationOnly, + title: , + }, + { + value: AgreeToTermsPolicy.RegistrationAndSignIn, + title: ( + + ), + }, +]; + function TermsForm() { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); const { register, formState: { errors }, + control, } = useFormContext(); return ( @@ -37,6 +58,16 @@ function TermsForm() { placeholder={t('sign_in_exp.content.terms_of_use.privacy_policy_placeholder')} /> + + ( +