diff --git a/frontend/src/routes/guest/register/index.tsx b/frontend/src/routes/guest/register/index.tsx index fa8e32f1cbf2c89a664e7c8166e55f12d8b60e89..44829257c452aff89f5f0cd21adeb7d273b66db9 100644 --- a/frontend/src/routes/guest/register/index.tsx +++ b/frontend/src/routes/guest/register/index.tsx @@ -357,7 +357,10 @@ export default function GuestRegister() { } const handleCancel = () => { - history.push('/') + // Go back to the invite page. The invitation ID does not need + // to be specified here, since the user has already been + // logged in and can be identified without the invitation ID + history.push('/invite') } return ( diff --git a/frontend/src/routes/guest/register/steps/register.tsx b/frontend/src/routes/guest/register/steps/register.tsx index 6c84276b29c920adbaee3a0bb70b8828b73cfc9b..84ec38863cbc6fe17e747a73b25c25c7c3110424 100644 --- a/frontend/src/routes/guest/register/steps/register.tsx +++ b/frontend/src/routes/guest/register/steps/register.tsx @@ -8,7 +8,7 @@ import { TextField, Typography, } from '@mui/material' -import { Controller, SubmitHandler, useForm } from 'react-hook-form' +import { SubmitHandler, Controller, useForm } from 'react-hook-form' import React, { forwardRef, Ref, @@ -17,7 +17,7 @@ import React, { useImperativeHandle, useState, } from 'react' -import { Trans, useTranslation } from 'react-i18next' +import { useTranslation, Trans } from 'react-i18next' import { CountryCallingCode, CountryCode, @@ -247,10 +247,10 @@ const GuestRegisterStep = forwardRef( > {t('guestRegisterWizardText.yourContactInformation')} </Typography> - <Typography sx={{ paddingBottom: '2rem' }}> + <Typography> {t('guestRegisterWizardText.contactInformationDescription')} - <Divider sx={{ border: '1px solid' }} /> </Typography> + <Divider sx={{ marginBottom: '2rem', border: '1px solid' }} /> <form onSubmit={onSubmit}> <Stack spacing={2}> <Controller @@ -468,13 +468,13 @@ const GuestRegisterStep = forwardRef( <Typography variant="h5" sx={{ paddingTop: '1rem' }}> {t('guestRegisterWizardText.identityHeader')} </Typography> - <Typography sx={{ paddingBottom: '1rem' }}> + <Typography> <Trans i18nKey="common:guestRegisterWizardText.identityBody"> Enter national identity number if you have one. <strong>Otherwise</strong> use passport information. </Trans> - <Divider sx={{ border: '1px solid' }} /> </Typography> + <Divider sx={{ marginBottom: '1rem', border: '1px solid' }} /> {/* The guest should fill in one of national ID number or passport number */} <Controller name="nationalIdNumber" @@ -555,24 +555,13 @@ const GuestRegisterStep = forwardRef( <Typography color="error">{idErrorState}</Typography> )} - {/* {initialGuestData.authentication_method === */} - {/* AuthenticationMethod.Feide && ( */} - {/* <TextField */} - {/* id="national_id_number" */} - {/* data-testid="national_id_number_feide" */} - {/* label={t('input.nationalIdNumber')} */} - {/* value={initialGuestData.fnr} */} - {/* disabled */} - {/* /> */} - {/* )} */} - <Typography variant="h5" sx={{ paddingTop: '1rem' }}> {t('guestRegisterWizardText.yourGuestPeriod')} </Typography> - <Typography sx={{ paddingBottom: '1rem' }}> + <Typography> {t('guestRegisterWizardText.guestPeriodDescription')} - <Divider sx={{ border: '1px solid' }} /> </Typography> + <Divider sx={{ marginBottom: '1rem', border: '1px solid' }} /> <TextField id="ou-unit" value={