diff --git a/src/components/auth/forgottenPassword/ForgottenPasswordForm.tsx b/src/components/auth/forgottenPassword/ForgottenPasswordForm.tsx index 659eafd58..f9125bc99 100644 --- a/src/components/auth/forgottenPassword/ForgottenPasswordForm.tsx +++ b/src/components/auth/forgottenPassword/ForgottenPasswordForm.tsx @@ -5,7 +5,7 @@ import { Typography, Grid } from '@mui/material' import SubmitButton from 'components/common/form/SubmitButton' import GenericForm from 'components/common/form/GenericForm' -import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' import { useMutation } from '@tanstack/react-query' import { AxiosError, AxiosResponse } from 'axios' import { ApiErrors } from 'service/apiErrors' @@ -62,7 +62,7 @@ export default function ForgottenPasswordForm({ - + diff --git a/src/components/auth/login/LoginForm.tsx b/src/components/auth/login/LoginForm.tsx index 7869737fe..d32c669bb 100644 --- a/src/components/auth/login/LoginForm.tsx +++ b/src/components/auth/login/LoginForm.tsx @@ -10,7 +10,7 @@ import { AlertStore } from 'stores/AlertStore' import FormInput from 'components/common/form/FormInput' import GenericForm from 'components/common/form/GenericForm' import SubmitButton from 'components/common/form/SubmitButton' -import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' import Google from 'common/icons/Google' import PasswordField from 'components/common/form/PasswordField' import { email, password } from 'common/form/validation' @@ -73,7 +73,7 @@ export default function LoginForm({ initialValues = defaults }: LoginFormProps) - + diff --git a/src/components/auth/profile/UpdateEmailModal.tsx b/src/components/auth/profile/UpdateEmailModal.tsx index 18c0de623..34ad1fc54 100644 --- a/src/components/auth/profile/UpdateEmailModal.tsx +++ b/src/components/auth/profile/UpdateEmailModal.tsx @@ -2,7 +2,7 @@ import { Modal, Box, Grid, IconButton } from '@mui/material' import { styled } from '@mui/material/styles' import GenericForm from 'components/common/form/GenericForm' import SubmitButton from 'components/common/form/SubmitButton' -import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' import { Person, UpdateUserAccount, UpdatePerson } from 'gql/person' import { useMutation } from '@tanstack/react-query' import { AxiosError, AxiosResponse } from 'axios' @@ -129,7 +129,7 @@ function UpdateEmailModal({ validationSchema={validationSchema}> - + diff --git a/src/components/auth/register/RegisterForm.tsx b/src/components/auth/register/RegisterForm.tsx index d7230ec3c..dac885e5f 100644 --- a/src/components/auth/register/RegisterForm.tsx +++ b/src/components/auth/register/RegisterForm.tsx @@ -15,6 +15,7 @@ import FormTextField from 'components/common/form/FormTextField' import PasswordField from 'components/common/form/PasswordField' import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField' import AcceptTermsField from 'components/common/form/AcceptTermsField' +import EmailField from 'components/common/form/EmailField' export type RegisterFormData = { firstName: string @@ -109,7 +110,7 @@ export default function RegisterForm({ initialValues = defaults }: RegisterFormP /> - + diff --git a/src/components/common/form/EmailField.tsx b/src/components/common/form/EmailField.tsx new file mode 100644 index 000000000..115fce5be --- /dev/null +++ b/src/components/common/form/EmailField.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import FormTextField, { RegisterFormProps } from './FormTextField' + +export type EmailFieldProps = Omit & { + type?: string +} + +export default function EmailField(props: EmailFieldProps) { + return +} diff --git a/src/components/contact/ContactForm.tsx b/src/components/contact/ContactForm.tsx index fd7df2f70..942ee4372 100644 --- a/src/components/contact/ContactForm.tsx +++ b/src/components/contact/ContactForm.tsx @@ -16,6 +16,7 @@ import FormTextField from 'components/common/form/FormTextField' import AcceptTermsField from 'components/common/form/AcceptTermsField' import { name, companyName, phone, email } from 'common/form/validation' import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField' +import EmailField from 'components/common/form/EmailField' const validationSchema: yup.SchemaOf = yup .object() @@ -110,13 +111,7 @@ export default function ContactForm({ initialValues = defaults }: ContactFormPro /> - + - + diff --git a/src/components/irregularity/admin/grid/EditForm.tsx b/src/components/irregularity/admin/grid/EditForm.tsx index c6d17d804..0449e74fc 100644 --- a/src/components/irregularity/admin/grid/EditForm.tsx +++ b/src/components/irregularity/admin/grid/EditForm.tsx @@ -24,6 +24,8 @@ import FileUpload from 'components/file-upload/FileUpload' import GenericForm from 'components/common/form/GenericForm' import SubmitButton from 'components/common/form/SubmitButton' import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' + import { IrregularityEditInput, IrregularityFileResponse, @@ -162,7 +164,7 @@ export default function EditForm({ campaigns, irregularity, irregularityFiles }: - + diff --git a/src/components/one-time-donation/AnonymousForm.tsx b/src/components/one-time-donation/AnonymousForm.tsx index df6a28e48..fdd735ea1 100644 --- a/src/components/one-time-donation/AnonymousForm.tsx +++ b/src/components/one-time-donation/AnonymousForm.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { useTranslation } from 'next-i18next' import { Grid, Typography } from '@mui/material' -import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' export default function AnonymousForm() { const { t } = useTranslation('one-time-donation') @@ -16,7 +16,7 @@ export default function AnonymousForm() { {t('anonymous-menu.info-start')} - + diff --git a/src/components/one-time-donation/LoginForm.tsx b/src/components/one-time-donation/LoginForm.tsx index a5cbb975e..615af598a 100644 --- a/src/components/one-time-donation/LoginForm.tsx +++ b/src/components/one-time-donation/LoginForm.tsx @@ -5,7 +5,7 @@ import { Box, Button, CircularProgress, Grid, Typography } from '@mui/material' import theme from 'common/theme' import Google from 'common/icons/Google' import { OneTimeDonation } from 'gql/donations' -import FormTextField from 'components/common/form/FormTextField' +import EmailField from '../common/form/EmailField' import { signIn } from 'next-auth/react' import { StepsContext } from './helpers/stepperContext' import { AlertStore } from 'stores/AlertStore' @@ -53,7 +53,7 @@ function LoginForm() { - + - + diff --git a/src/components/person/grid/PersonForm.tsx b/src/components/person/grid/PersonForm.tsx index a90575425..2251a9a5e 100644 --- a/src/components/person/grid/PersonForm.tsx +++ b/src/components/person/grid/PersonForm.tsx @@ -6,6 +6,7 @@ import GenericForm from 'components/common/form/GenericForm' import { name, phone, email } from 'common/form/validation' import SubmitButton from 'components/common/form/SubmitButton' import FormTextField from 'components/common/form/FormTextField' +import EmailField from 'components/common/form/EmailField' import { AdminPersonFormData, AdminPersonResponse, PersonResponse } from 'gql/person' import { useMutation, UseQueryResult } from '@tanstack/react-query' import { AxiosError, AxiosResponse } from 'axios' @@ -100,13 +101,7 @@ export default function PersonForm({ initialValues = defaults }: FormProps) { /> */} - +