Skip to content

Commit fc7e6a7

Browse files
author
Fawad Ali
committed
Merge branch 'main' into fix/CCM-5756_create-page-snags
2 parents 48fb078 + a9c5183 commit fc7e6a7

File tree

15 files changed

+75
-49
lines changed

15 files changed

+75
-49
lines changed

src/__tests__/app/email-template-submitted/__snapshots__/page.test.tsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ exports[`EmailTemplateSubmitted 1`] = `
6262
If you've already onboarded
6363
</h3>
6464
<p>
65+
Once you've submitted all your templates
6566
<a
6667
href="https://nhsdigitallive.service-now.com/nhs_digital?id=sc_cat_item&sys_id=6208dbce1be759102eee65b9bd4bcbf5"
6768
id="servicenow-link"
69+
rel="noopener noreferrer"
70+
target="_blank"
6871
>
69-
Raise a request with the service desk
72+
raise a request with the service desk (opens in a new tab).
7073
</a>
71-
once you've submitted all your templates.
7274
</p>
7375
</div>
7476
</div>

src/__tests__/app/nhs-app-template-submitted/__snapshots__/page.test.tsx.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ exports[`NhsAppTemplateSubmittedPage 1`] = `
6262
If you've already onboarded
6363
</h3>
6464
<p>
65+
Once you've submitted all your templates
6566
<a
6667
href="https://nhsdigitallive.service-now.com/nhs_digital?id=sc_cat_item&sys_id=6208dbce1be759102eee65b9bd4bcbf5"
6768
id="servicenow-link"
69+
rel="noopener noreferrer"
70+
target="_blank"
6871
>
69-
Raise a request with the service desk
72+
raise a request with the service desk (opens in a new tab).
7073
</a>
71-
once you've submitted all your templates.
7274
</p>
7375
</div>
7476
</div>

src/__tests__/components/forms/EmailTemplateForm/__snapshots__/EmailTemplateForm.test.tsx.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ exports[`renders page one error 1`] = `
7878
class="nhsuk-heading-xl"
7979
data-testid="page-heading"
8080
>
81-
Create Email message template
81+
Create email template
8282
</h1>
8383
<div
8484
class="border"
@@ -336,17 +336,17 @@ exports[`renders page one error 1`] = `
336336
<span
337337
class="inlineText"
338338
>
339-
line 1
339+
line 1  
340340
</span>
341341
<span
342342
class="inlineText"
343343
>
344-
line 2
344+
line 2  
345345
</span>
346346
<span
347347
class="inlineText"
348348
>
349-
line 3
349+
line 3  
350350
</span>
351351
</code>
352352
<p
@@ -644,7 +644,7 @@ exports[`renders page with multiple errors 1`] = `
644644
class="nhsuk-heading-xl"
645645
data-testid="page-heading"
646646
>
647-
Create Email message template
647+
Create email template
648648
</h1>
649649
<div
650650
class="border"
@@ -928,17 +928,17 @@ exports[`renders page with multiple errors 1`] = `
928928
<span
929929
class="inlineText"
930930
>
931-
line 1
931+
line 1  
932932
</span>
933933
<span
934934
class="inlineText"
935935
>
936-
line 2
936+
line 2  
937937
</span>
938938
<span
939939
class="inlineText"
940940
>
941-
line 3
941+
line 3  
942942
</span>
943943
</code>
944944
<p
@@ -1197,7 +1197,7 @@ exports[`renders page with preloaded field values 1`] = `
11971197
class="nhsuk-heading-xl"
11981198
data-testid="page-heading"
11991199
>
1200-
Create Email message template
1200+
Create email template
12011201
</h1>
12021202
<div
12031203
class="border"
@@ -1443,17 +1443,17 @@ exports[`renders page with preloaded field values 1`] = `
14431443
<span
14441444
class="inlineText"
14451445
>
1446-
line 1
1446+
line 1  
14471447
</span>
14481448
<span
14491449
class="inlineText"
14501450
>
1451-
line 2
1451+
line 2  
14521452
</span>
14531453
<span
14541454
class="inlineText"
14551455
>
1456-
line 3
1456+
line 3  
14571457
</span>
14581458
</code>
14591459
<p

src/__tests__/components/forms/NhsAppTemplateForm/__snapshots__/NhsAppTemplateForm.test.tsx.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,17 @@ exports[`renders page 1`] = `
266266
<span
267267
class="inlineText"
268268
>
269-
line 1
269+
line 1  
270270
</span>
271271
<span
272272
class="inlineText"
273273
>
274-
line 2
274+
line 2  
275275
</span>
276276
<span
277277
class="inlineText"
278278
>
279-
line 3
279+
line 3  
280280
</span>
281281
</code>
282282
<p
@@ -710,17 +710,17 @@ exports[`renders page one error 1`] = `
710710
<span
711711
class="inlineText"
712712
>
713-
line 1
713+
line 1  
714714
</span>
715715
<span
716716
class="inlineText"
717717
>
718-
line 2
718+
line 2  
719719
</span>
720720
<span
721721
class="inlineText"
722722
>
723-
line 3
723+
line 3  
724724
</span>
725725
</code>
726726
<p
@@ -1168,17 +1168,17 @@ exports[`renders page with multiple errors 1`] = `
11681168
<span
11691169
class="inlineText"
11701170
>
1171-
line 1
1171+
line 1  
11721172
</span>
11731173
<span
11741174
class="inlineText"
11751175
>
1176-
line 2
1176+
line 2  
11771177
</span>
11781178
<span
11791179
class="inlineText"
11801180
>
1181-
line 3
1181+
line 3  
11821182
</span>
11831183
</code>
11841184
<p
@@ -1570,17 +1570,17 @@ exports[`renders page with preloaded field values 1`] = `
15701570
<span
15711571
class="inlineText"
15721572
>
1573-
line 1
1573+
line 1  
15741574
</span>
15751575
<span
15761576
class="inlineText"
15771577
>
1578-
line 2
1578+
line 2  
15791579
</span>
15801580
<span
15811581
class="inlineText"
15821582
>
1583-
line 3
1583+
line 3  
15841584
</span>
15851585
</code>
15861586
<p

src/__tests__/components/forms/SmsTemplateForm/__snapshots__/SmsTemplateForm.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ exports[`CreateSmsTemplate component renders page 1`] = `
149149
<a
150150
data-testid="sms-pricing-link"
151151
href="/pricing/text-messages"
152-
rel="noreferrer"
152+
rel="noopener noreferrer"
153153
target="_blank"
154154
>
155155
Learn more about character counts and text messaging pricing (opens in a new tab)
@@ -485,7 +485,7 @@ exports[`CreateSmsTemplate component renders page one error 1`] = `
485485
<a
486486
data-testid="sms-pricing-link"
487487
href="/pricing/text-messages"
488-
rel="noreferrer"
488+
rel="noopener noreferrer"
489489
target="_blank"
490490
>
491491
Learn more about character counts and text messaging pricing (opens in a new tab)
@@ -835,7 +835,7 @@ exports[`CreateSmsTemplate component renders page with multiple errors 1`] = `
835835
<a
836836
data-testid="sms-pricing-link"
837837
href="/pricing/text-messages"
838-
rel="noreferrer"
838+
rel="noopener noreferrer"
839839
target="_blank"
840840
>
841841
Learn more about character counts and text messaging pricing (opens in a new tab)
@@ -1127,7 +1127,7 @@ exports[`CreateSmsTemplate component renders page with preloaded field values 1`
11271127
<a
11281128
data-testid="sms-pricing-link"
11291129
href="/pricing/text-messages"
1130-
rel="noreferrer"
1130+
rel="noopener noreferrer"
11311131
target="_blank"
11321132
>
11331133
Learn more about character counts and text messaging pricing (opens in a new tab)

src/__tests__/components/forms/SubmitTemplate/__snapshots__/SubmitTemplate.test.tsx.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ exports[`SubmitTemplate component should render 1`] = `
9292
type="hidden"
9393
value="template-id"
9494
/>
95+
<a
96+
aria-disabled="false"
97+
class="nhsuk-button nhsuk-button--secondary nhsuk-u-margin-right-3"
98+
draggable="false"
99+
href="/templates/example/template-id"
100+
id="go-back-button"
101+
role="button"
102+
>
103+
Go back
104+
</a>
95105
<button
96106
aria-disabled="false"
97107
class="nhsuk-button"

src/components/forms/SmsTemplateForm/SmsTemplateForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const SmsTemplateForm: FC<
9494
href={content.smsPricingLink}
9595
data-testid='sms-pricing-link'
9696
target='_blank'
97-
rel='noreferrer'
97+
rel='noopener noreferrer'
9898
>
9999
{content.smsPricingText}
100100
</a>

src/components/forms/SubmitTemplate/SubmitTemplate.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { FC } from 'react';
44
import { WarningCallout, Button, BackLink } from 'nhsuk-react-components';
55
import { SubmitTemplatePageComponentProps } from '@utils/types';
6-
import { submitNhsAppTemplateContent } from '@content/content';
6+
import { submitTemplateContent } from '@content/content';
77
import { NHSNotifyFormWrapper } from '@molecules/NHSNotifyFormWrapper/NHSNotifyFormWrapper';
88
import { getBasePath } from '@utils/get-base-path';
99
import { submitTemplate } from '@forms/SubmitTemplate/server-action';
@@ -23,8 +23,9 @@ export const SubmitTemplate: FC<SubmitTemplatePageComponentProps> = ({
2323
submitChecklistIntroduction,
2424
submitChecklistItems,
2525
submitChecklistParagraphs,
26+
goBackButtonText,
2627
buttonText,
27-
} = submitNhsAppTemplateContent;
28+
} = submitTemplateContent;
2829

2930
return (
3031
<div className='nhsuk-grid-row'>
@@ -59,6 +60,14 @@ export const SubmitTemplate: FC<SubmitTemplatePageComponentProps> = ({
5960
action={submitTemplate.bind(null, submitPath)}
6061
>
6162
<input type='hidden' name='templateId' value={templateId} readOnly />
63+
<Button
64+
secondary
65+
id='go-back-button'
66+
className='nhsuk-u-margin-right-3'
67+
href={`${getBasePath()}/${goBackPath}/${templateId}`}
68+
>
69+
{goBackButtonText}
70+
</Button>
6271
<Button id='submit-template-button'>{buttonText}</Button>
6372
</NHSNotifyFormWrapper>
6473
</div>

src/components/layouts/container/container.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ export async function NHSNotifyContainer({
55
}) {
66
return (
77
<div className='nhsuk-width-container'>
8-
<main
9-
className='nhsuk-main-wrapper nhsuk-u-padding-top-4'
10-
id='maincontent'
11-
role='main'
12-
>
8+
<main className='nhsuk-main-wrapper' id='maincontent' role='main'>
139
{process.env.NEXT_PUBLIC_DISABLE_CONTENT === 'true' ? (
1410
<h1>Coming soon</h1>
1511
) : (

src/components/molecules/Footer/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function NHSNotifyFooter() {
2323
href={footerContent.links.accessibilityStatement.url}
2424
data-testid='accessibility-statement-link'
2525
target='_blank'
26-
rel='noreferrer'
26+
rel='noopener noreferrer'
2727
>
2828
{footerContent.links.accessibilityStatement.text}
2929
</a>

0 commit comments

Comments
 (0)