-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8571ee
commit 2237370
Showing
7 changed files
with
217 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"title": "FAQ & Contact", | ||
"faq": "FAQ", | ||
"description": "Vous avez des questions sur l'événement ? Consultez notre FAQ pour obtenir des réponses rapides sur le lieu, la billetterie, les conférences et bien plus. Si vous avez besoin de plus d'informations, n'hésitez pas à nous contacter !" | ||
"description": "Vous avez des questions sur l'événement ? Consultez notre FAQ pour obtenir des réponses rapides sur le lieu, la billetterie, les conférences et bien plus. Si vous avez besoin de plus d'informations, n'hésitez pas à nous contacter !", | ||
"contactFormTitle": "Toujours besoin d’aide ? Envoyer nous un message", | ||
"contactFormActionUrl": "https://forms.zohopublic.eu/mm25fropen1/form/ContactUs/formperma/ZHVFtNjDA2zl9Kg7YZsWC2_X8jKowgy3vt6j_YvOsRQ/htmlRecords/submit" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import Label from "@/components/Form/Label/Label"; | ||
import Input from "@/components/Form/Input/Input"; | ||
import classNames from "classnames"; | ||
|
||
interface Field { | ||
variant?: 'input' | 'textarea'; | ||
label: string; | ||
labelPosition?: 'left' | 'right' | 'top' | ||
id?: string; | ||
name: string; | ||
type?: string; | ||
required: boolean; | ||
placeholder?: string; | ||
value?: string; | ||
className?: string; | ||
} | ||
|
||
const wrapperClass = { | ||
left: 'flex flex-row', | ||
right: 'flex flex-row-reverse justify-end', | ||
top: 'flex flex-col' | ||
} | ||
const labelClass = { | ||
left: 'mr-2', | ||
right: 'ml-2', | ||
top: 'block mb-2' | ||
}; | ||
const inputClass = { | ||
left: '', | ||
right: '', | ||
top: 'block w-full' | ||
}; | ||
|
||
const Field = ({ variant = 'input', label, labelPosition = 'top', id, name, type, required, placeholder, value, className }: Field) => { | ||
return ( | ||
<div className={classNames(wrapperClass[labelPosition], className)}> | ||
<Label required={required} className={labelClass[labelPosition]}> | ||
{label} | ||
</Label> | ||
<Input | ||
variant={variant} | ||
type={type} | ||
id={id} | ||
name={name} | ||
required={required} | ||
placeholder={placeholder} | ||
value={value} | ||
className={inputClass[labelPosition]} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Field; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import classNames from "classnames"; | ||
|
||
interface Input { | ||
variant: 'input' | 'textarea'; | ||
type?: string; | ||
id?: string; | ||
name: string; | ||
required: boolean; | ||
placeholder?: string; | ||
value?: string; | ||
className?: string; | ||
} | ||
|
||
const Input = ({ variant, type = 'text', id, name, required, placeholder, value, className }: Input) => { | ||
const classHtml = classNames( | ||
'border rounded-md border-primary bg-white py-2 px-4 text-base font-normal', | ||
className | ||
); | ||
if (variant === 'textarea') { | ||
return ( | ||
<textarea | ||
className={classHtml} | ||
id={id} | ||
name={name} | ||
required={required} | ||
placeholder={placeholder} | ||
rows={4} | ||
> | ||
{value} | ||
</textarea> | ||
); | ||
} | ||
|
||
return ( | ||
<input className={classHtml} type={type} id={id} name={name} required={required} placeholder={placeholder} value={value}/> | ||
); | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ReactNode } from "react"; | ||
import classNames from "classnames"; | ||
|
||
interface Label { | ||
required: boolean; | ||
className?: string; | ||
children?: ReactNode; | ||
} | ||
|
||
const Label = ({ required, className, children }: Label) => { | ||
return ( | ||
<label className={classNames( | ||
"text-base font-semibold", | ||
className | ||
)}> | ||
{children} | ||
{required && (<em className="text-red-700 not-italic ml-1">*</em>)} | ||
</label> | ||
); | ||
}; | ||
|
||
export default Label; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import Form from "next/form"; | ||
import Field from "@/components/Form/Field/Field"; | ||
import { useTranslation } from "react-i18next"; | ||
import Link from "next/link"; | ||
import Typography from "@/components/Typography/Typography"; | ||
|
||
interface Contact { | ||
action: string | ||
} | ||
|
||
const ContactForm = ({ action }: Contact) => { | ||
const { t } = useTranslation(['common']); | ||
|
||
return ( | ||
<Form action={action} formMethod="POST" className="text-base text-black font-semibold"> | ||
{/* To Track referrals , place the referrer name within the " " in the above hidden input field */} | ||
<input type="hidden" name="zf_referrer_name" value="mmfr-website"/> | ||
{/* To redirect to a specific page after record submission , place the respective url within the " " in the above hidden input field */} | ||
<input type="hidden" name="zf_redirect_url" value="https://meet-magento.opengento.fr/contact"/> | ||
{/* If GCLID is enabled in Zoho CRM Integration, click details of AdWords Ads will be pushed to Zoho CRM */} | ||
<input type="hidden" name="zc_gad" value=""/> | ||
|
||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-5"> | ||
<Field | ||
label={t('common:Name')} | ||
name="Name_First" | ||
type="text" | ||
required={true} | ||
placeholder={t('common:fullname')} | ||
/> | ||
<Field | ||
label={t('common:Email')} | ||
name="Email" | ||
type="email" | ||
required={true} | ||
/> | ||
<Field | ||
label={t('common:Objet')} | ||
name="SingleLine" | ||
type="text" | ||
required={true} | ||
className="lg:col-span-2" | ||
/> | ||
<Field | ||
label={t('common:Message')} | ||
name="MultiLine" | ||
variant="textarea" | ||
required={true} | ||
placeholder={t('common:help')} | ||
className="lg:col-span-2" | ||
/> | ||
<div className="lg:col-span-2"> | ||
<Field | ||
label={t('common:agreeTerms')} | ||
labelPosition="right" | ||
name="TermsConditions" | ||
type="checkbox" | ||
required={true} | ||
/> | ||
<Typography variant="small" color="dark" className="my-2"> | ||
En cliquant sur “Soumettre”, j’autorise Meet Magento France à traiter mes données et à me | ||
recontacter pour répondre à ma demande selon notre <Link className="underline" href="/mentions-legales#data-protection"> | ||
politique de confidentialité</Link>. | ||
</Typography> | ||
</div> | ||
</div> | ||
<button | ||
type="submit" | ||
className="bg-primary border border-white rounded-3xl text-white text-center hover:border-primary hover:bg-white hover:text-primary my-6 p-3 min-w-48 duration-300" | ||
> | ||
<span className="font-semibold">{t('common:send')}</span> | ||
</button> | ||
</Form> | ||
); | ||
}; | ||
|
||
export default ContactForm; |