diff --git a/apps/web/pages/signup.tsx b/apps/web/pages/signup.tsx index 9abe9fa6a5..a189c9c2f0 100644 --- a/apps/web/pages/signup.tsx +++ b/apps/web/pages/signup.tsx @@ -7,6 +7,7 @@ import { useRouter, useSearchParams } from "next/navigation"; import type { CSSProperties } from "react"; import type { SubmitHandler } from "react-hook-form"; import { useForm } from "react-hook-form"; +import { Trans } from "react-i18next"; import { z } from "zod"; import getStripe from "@calcom/app-store/stripepayment/lib/client"; @@ -16,7 +17,7 @@ import { isSAMLLoginEnabled } from "@calcom/features/ee/sso/lib/saml"; import { useFlagMap } from "@calcom/features/flags/context/provider"; import { getFeatureFlagMap } from "@calcom/features/flags/server/utils"; import { classNames } from "@calcom/lib"; -import { IS_SELF_HOSTED, WEBAPP_URL } from "@calcom/lib/constants"; +import { IS_CALCOM, IS_SELF_HOSTED, WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import slugify from "@calcom/lib/slugify"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry"; @@ -44,9 +45,9 @@ export default function Signup({ prepopulateFormValues, token, orgSlug }: Signup const { t, i18n } = useLocale(); const router = useRouter(); const flags = useFlagMap(); - const formMethods = useForm({ + const formMethods = useForm({ resolver: zodResolver(signupSchema), - // defaultValues: prepopulateFormValues satisfies FormValues, + defaultValues: prepopulateFormValues satisfies FormValues, }); const { register, @@ -117,14 +118,21 @@ export default function Signup({ prepopulateFormValues, token, orgSlug }: Signup
{/* Header */}
-

Create your Cal.com account

-

- Free for individuals. Team plans for collaborative features. -

+

+ {IS_CALCOM ? t("create_your_calcom_account") : t("create_your_account")} +

+ {IS_CALCOM ? ( +

{t("cal_signup_description")}

+ ) : null}
{/* Form Container */}
-
+ { + await signUp(values); + }}> {/* Username */} - @@ -153,7 +161,7 @@ export default function Signup({ prepopulateFormValues, token, orgSlug }: Signup
- Or continue with + {t("or_continue_with")}
@@ -219,11 +227,20 @@ export default function Signup({ prepopulateFormValues, token, orgSlug }: Signup
- I already have an account. + {t("already_have_account")}

- By signing up, you agree to our Terms of Service and{" "} - Privacy Policy. + + By signing up, you agree to our{" "} + + Terms of Service + {" "} + and{" "} + + Privacy Policy + + . +

diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index f252a96d2f..2b05fbc2e8 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -67,6 +67,7 @@ "cannot_repackage_codebase": "You can not repackage or sell the codebase", "acquire_license": "Acquire a commercial license to remove these terms by emailing", "terms_summary": "Summary of terms", + "signing_up_terms":"By signing up, you agree to our <1>{{terms_of_service}} and <2>{{privacy_policy}}.", "open_env": "Open .env and agree to our License", "env_changed": "I've changed my .env", "accept_license": "Accept License", @@ -229,6 +230,7 @@ "reset_your_password": "Set your new password with the instructions sent to your email address.", "email_change": "Log back in with your new email address and password.", "create_your_account": "Create your account", + "create_your_calcom_account": "Create your Cal.com account", "sign_up": "Sign up", "youve_been_logged_out": "You've been logged out", "hope_to_see_you_soon": "We hope to see you again soon!", @@ -1025,6 +1027,7 @@ "user_impersonation_heading": "User Impersonation", "user_impersonation_description": "Allows our support team to temporarily sign in as you to help us quickly resolve any issues you report to us.", "team_impersonation_description": "Allows your team Owners/Admins to temporarily sign in as you.", + "cal_signup_description":"Free for individuals. Team plans for collaborative features.", "make_team_private": "Make team private", "make_team_private_description": "Your team members won't be able to see other team members when this is turned on.", "you_cannot_see_team_members": "You cannot see all the team members of a private team.", @@ -1512,6 +1515,7 @@ "your_org_disbanded_successfully": "Your organization has been disbanded successfully", "error_creating_team": "Error creating team", "you": "You", + "or_continue_with": "Or continue with", "resend_email": "Resend email", "member_already_invited": "Member has already been invited", "enter_email_or_username": "Enter an email or username", @@ -1566,6 +1570,7 @@ "enable_apps": "Enable Apps", "enable_apps_description": "Enable apps that users can integrate with {{appName}}", "purchase_license": "Purchase a License", + "already_have_account":"I already have an account", "already_have_key": "I already have a key:", "already_have_key_suggestion": "Please copy your existing CALCOM_LICENSE_KEY environment variable here.", "app_is_enabled": "{{appName}} is enabled",