Skip to content

Commit

Permalink
Added ReCAPTCHA form component to Tuition form
Browse files Browse the repository at this point in the history
  • Loading branch information
MocicaRazvan committed Jan 20, 2024
1 parent b3e0d02 commit f6ccc48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/forms/faculties/TuitionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import AgreeEuPlatescForm from "../reusable/AgreeEuPlatesc";
import AgreeToTermsForm from "../reusable/AgreeToTermsForm";
import SubmitButton from "../reusable/SubmitButton";
import { submitTuition } from "@/actions/forms";
import ReCAPTCHAForm from "../reusable/ReCAPTCHAForm";

/**
* `TuitionForm` is a React component for managing and submitting admission forms.
Expand Down Expand Up @@ -56,6 +57,7 @@ export default function TuitionForm({
variableAmountTexts,
didacticPremiumCardText,
acceptEuPlatescTexts,
recaptchaTexts,
}: Props) {
const methods = useForm<TuitionFormInput>({
defaultValues: {
Expand All @@ -74,6 +76,7 @@ export default function TuitionForm({
didacticPremiumCardOnly: false,
partialPay: false,
acceptEuPlatesc: false,
recaptcha: "",
},
});

Expand Down Expand Up @@ -141,7 +144,14 @@ export default function TuitionForm({
<PersonalDetailsForm {...personalTexts} />

<AgreeToTermsForm {...agreeTexts} />

<AgreeEuPlatescForm {...acceptEuPlatescTexts} />

<ReCAPTCHAForm<TuitionFormInput>
control={control}
{...recaptchaTexts}
/>

<div className="col-span-2 w-full text-center flex items-center justify-center">
<SubmitButton isSubmitting={isSubmitting} {...submitTexts} />
</div>
Expand Down

0 comments on commit f6ccc48

Please sign in to comment.