Skip to content

Commit

Permalink
fix: modal tos text
Browse files Browse the repository at this point in the history
Fix the modal terms of service text to be compliance with GDPR.
Enlarge the modal size so the bigger text is shown with better style.

fccn/nau-technical#367
  • Loading branch information
igobranco committed Dec 6, 2024
1 parent 7e5ad77 commit 47d0b38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/components/modal-tos/ModalToS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const ModalToS = () => {
const {
MODAL_UPDATE_TERMS_OF_SERVICE,
PRIVACY_POLICY_URL,
SITE_NAME,
TERMS_OF_SERVICE_URL,
TOS_AND_HONOR_CODE,
} = getConfig();
Expand Down Expand Up @@ -92,6 +91,7 @@ const ModalToS = () => {
isOpen={isOpen}
onClose={close}
hasCloseButton={false}
size="lg"
>
{title[lang] && (
<ModalDialog.Header>
Expand Down Expand Up @@ -127,10 +127,9 @@ const ModalToS = () => {
<FormattedMessage
id="modalToS.termsOfService.checkbox.label"
description="The label for the terms of service checkbox inside the TOS modal."
defaultMessage="I agree to the {platformName}&nbsp;<a>Terms of Service</a>"
defaultMessage="I have read, understood and accept the&nbsp;<a>Terms and Conditions</a>"
values={{
a: chunks => createTOSLink(chunks, TERMS_OF_SERVICE_URL),
platformName: SITE_NAME,
}}
/>
</Form.Checkbox>
Expand All @@ -141,10 +140,9 @@ const ModalToS = () => {
<FormattedMessage
id="modalToS.honorCode.checkbox.label"
description="The label for the honor code checkbox inside the TOS modal."
defaultMessage="I agree to the {platformName}&nbsp;<a>Honor Code</a>"
defaultMessage="I have read and understood the&nbsp;<a>Honor Code</a>"
values={{
a: chunks => createTOSLink(chunks, TOS_AND_HONOR_CODE),
platformName: SITE_NAME,
}}
/>
</Form.Checkbox>
Expand Down
4 changes: 2 additions & 2 deletions src/components/modal-tos/ModalToS.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('ModalTOS Component', () => {
expect(button).toBeDisabled();

const privacyCheckbox = screen.getByLabelText(/Privacy Policy/i);
const termsCheckbox = screen.getByLabelText(/Terms of Service/i, { selector: 'input' });
const termsCheckbox = screen.getByLabelText(/Terms and Conditions/i, { selector: 'input' });

fireEvent.click(privacyCheckbox); // Click first checkbox
expect(button).toBeDisabled(); // Button should still be disabled
Expand All @@ -134,7 +134,7 @@ describe('ModalTOS Component', () => {
await waitFor(() => screen.getByText(/Attention/i));

const privacyCheckbox = screen.getByLabelText(/Privacy Policy/i);
const termsCheckbox = screen.getByLabelText(/Terms of Service/i, { selector: 'input' });
const termsCheckbox = screen.getByLabelText(/Terms and Conditions/i, { selector: 'input' });

// Check all checkboxes
fireEvent.click(privacyCheckbox);
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/messages/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"footer.languageForm.submit.label": "Aplicar",
"footer.copyright.message": "Todos os direitos reservados.",
"modalToS.dataAuthorization.checkbox.label": "Li e compreendi a&nbsp;<a>Política de Privacidade</a>",
"modalToS.termsOfService.checkbox.label": "Li e compreendi o {platformName}&nbsp;<a>Termos e Condições</a>",
"modalToS.honorCode.checkbox.label": "Li e compreendi o {platformName}&nbsp;<a>Honor Code</a>",
"modalToS.termsOfService.checkbox.label": "Li, compreendi e aceito os&nbsp;<a>Termos e Condições</a>",
"modalToS.honorCode.checkbox.label": "Li e compreendi o&nbsp;<a>Código de Honra</a>",
"modalToS.acceptance.button": "Aceito os novos termos de serviço"
}

0 comments on commit 47d0b38

Please sign in to comment.