Skip to content
Snippets Groups Projects
Verified Commit 872b30b3 authored by Andreas Ellewsen's avatar Andreas Ellewsen
Browse files

Add instance specific verification text

It turns out that different institutions have different criteria for
what counts as good enough papers to verify an Norwegian National
identity number. This commit makes it possible to specify different text
for each language option for each instance.

Resolves: GREG-199
parent 9b1c7689
No related branches found
No related tags found
1 merge request!277Add instance specific verification text
Pipeline #114723 passed
......@@ -164,7 +164,12 @@
"sponsorSubmitSuccessDescription": "Your registration has been completed. You will receive an e-mail when the guest has filled in the missing information, so that the guest account can be approved.",
"guestSubmitSuccessDescription": "Your registration is now completed. You will receive an e-mail or SMS when your account has been created.",
"confirmationDialog": {
"confirmIdentityText": "Are you sure you want to verify this identity?",
"text": {
"uio": "Before verifying this identity, please make sure that you have seen ID-papers with a picture matching the supplied value. Approved papers are passport, Norwegian driver's license, and Norwegian national ID card.",
"uib": "Are you sure you want to verify this identity?",
"default": "Are you sure you want to verify this identity?"
},
"confirmIdentityTitle": "Confirm?",
"cancelInvitation": "Cancel invitation?",
"cancelInvitationDescription": "Do you want to cancel the invitation?"
......
......@@ -164,7 +164,11 @@
"sponsorSubmitSuccessDescription": "Din registrering er nå fullført. Du vil få en e-post når gjesten har fylt inn informasjonen som mangler, slik at gjestekontoen kan godkjennes.",
"guestSubmitSuccessDescription": "Din registrering er nå fullført. Du vil få en e-post eller SMS når kontoen er opprettet.",
"confirmationDialog": {
"confirmIdentityText": "Er du sikker på at du vil bekrefte denne identiteten?",
"text": {
"uio": "Vennligst sammenlign verdien du godkjenner mot ID-papirer med bilde, før du godkjenner. Godkjente papirer er pass, norsk førerkort og norsk nasjonalt ID-kort.",
"uib": "Er du sikker på at du vil bekrefte denne identiteten?",
"default": "Er du sikker på at du vil bekrefte denne identiteten?"
},
"confirmIdentityTitle": "Bekrefte?",
"cancelInvitation": "Kanseller invitasjon?",
"cancelInvitationDescription": "Vil du kansellere invitasjonen?"
......
......@@ -164,7 +164,12 @@
"sponsorSubmitSuccessDescription": "Di registrering er no fullført. Du vil få ein e-post når gjesten har fylt inn informasjonen som manglar, slik at gjestekontoen kan godkjennast.",
"guestSubmitSuccessDescription": "Di registrering er no fullført. Du vil få ein e-post eller SMS når kontoen er oppretta.",
"confirmationDialog": {
"confirmIdentityText": "Er du sikker på at du vil bekrefte denne identiteten?",
"text": {
"uio": "Vennligst sammenlign verdien du godkjenner mot ID-papirer med bilde, før du godkjenner. Godkjente papirer er pass, norsk førerkort og norsk nasjonalt ID-kort.",
"uib": "Er du sikker på at du vil bekrefte denne identiteten?",
"default": "Er du sikker på at du vil bekrefte denne identiteten?"
},
"confirmIdentityTitle": "Bekrefte?",
"cancelInvitation": "Kanseller invitasjon?",
"cancelInvitationDescription": "Vil du kansellere invitasjonen?"
......
......@@ -6,6 +6,7 @@ import { submitJsonOpts } from 'utils'
import CheckIcon from '@mui/icons-material/Check'
import { useTranslation } from 'react-i18next'
import { TableCell } from 'components/table'
import { appInst } from 'appConfig'
interface IdentityLineProps {
text: string
......@@ -32,6 +33,16 @@ const IdentityLine = ({
if (identity == null) {
return <></>
}
const getDialogText = () => {
switch (appInst) {
case 'uio':
return t('confirmationDialog.text.uio')
case 'uib':
return t('confirmationDialog.text.uib')
default:
return t('confirmationDialog.text.default')
}
}
return (
<TableRow>
<TableCell align="left">{text}</TableCell>
......@@ -52,7 +63,7 @@ const IdentityLine = ({
setOpen={setConfirmOpen}
onConfirm={verifyIdentity(identity.id)}
>
{t('confirmationDialog.confirmIdentityText')}
{getDialogText()}
</ConfirmDialog>
</Typography>
) : (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment