From cdf48a81a78b02215a38a1d84faecc6d08b13019 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 3 Jun 2025 19:03:53 +0100 Subject: [PATCH] 16937 welsh contact us form --- i18n.js | 4 +- locales/cy/common.json | 21 +++++++++- locales/en/common.json | 21 +++++++++- pages/contactus.js | 81 ++++++++++++++++++++++--------------- pages/myportal/contactus.js | 79 ++++++++++++++++++++++-------------- 5 files changed, 139 insertions(+), 67 deletions(-) diff --git a/i18n.js b/i18n.js index ba354e6e..e1561f1f 100644 --- a/i18n.js +++ b/i18n.js @@ -11,8 +11,8 @@ module.exports = { "pages": { "*": ["common", "search"], "/": ["common", "home", "case"], - "/contactus": ["newappeal", "account"], - "/myportal/contactus": ["newappeal", "account"], + "/contactus": ["newappeal", "account", "common"], + "/myportal/contactus": ["newappeal", "account", "common"], "/error": ["common", "home", "myportal"], "/furtherdetails": ["common", "home", "myportal"], "/myportal": ["myportal", "common", "home", "case"], diff --git a/locales/cy/common.json b/locales/cy/common.json index 77e6a246..4071caca 100644 --- a/locales/cy/common.json +++ b/locales/cy/common.json @@ -94,5 +94,24 @@ "awaitingsubmissiondetails-viewall-title": "Gweld pob apêl sy'n aros i gael ei chyflwyno", "myrepresentations-viewall-title": "Gweld pob cynrychiolaeth sy'n aros i gael ei chyflwyno", "watchedcases-viewall-title": "Gweld pob achos a wyliwyd", - "mySubmittedreps-viewall-title": "Gweld pob cynrychiolaeth a gyflwynwyd" + "mySubmittedreps-viewall-title": "Gweld pob cynrychiolaeth a gyflwynwyd", + "contact-us-title": "Cysylltwch â Ni", + "contact-us-email-label": "Eich cyfeiriad e-bost", + "contact-us-contact-type-label": "Beth hoffech chi gysylltu â ni amdano?", + "contact-us-contact-body-label": "Beth hoffech chi ei ofyn?", + "contact-us-send-button": "Anfonwch eich cwestiwn", + "contact-us-clear-form-button": "Clirio'r ffurflen", + "contact-us-thank-you-title": "Diolch am eich ymholiad", + "contact-us-thank-you-sub": "Byddwn yn cysylltu â chi cyn gynted â phosibl.", + "contact-us-para": "Mae'r wybodaeth hon yn ddilys, ac mae'n rhaid i chi ddilyn eich ymholiad. Nid oes ganddyn nhw unrhyw beth i'w wneud, ond maen nhw wedi cael eu ffafrio'n rhydd. Mae'n anodd dweud dim byd arall wrthych. Os nad ydych chi'n gwybod, maen nhw'n byw bywyd. lacinia, enim tortor bibendum lorem, ut tincidunt lacus sapien quis lorem. Aenean interdum dolor augue, ac cursus lectus suscipit vitae.", + "contact-us-select-plq": "Ymholiad deddfwriaeth gynllunio", + "contact-us-select-ipq": "Ymholiad gweithdrefn seilwaith", + "contact-us-select-pcpq": "Ymholiad gweithdrefn gwaith achos cynllunio", + "contact-us-select-pi": "Materion Porth", + "contact-us-select-appadvice": "Cyngor cyflwyno apêl", + "contact-us-select-repadvice": "Cyngor cyflwyno sylwadau", + "contact-us-select-ceq": "Ymholiad Digwyddiadau Gwaith Achos", + "contact-us-select-other": "Unrhyw Ymholiadau Eraill", + "contact-us-select-postdec": "Ar ôl Penderfyniad", + "contact-us-select-comp": "Cwynion/Canmoliaethau" } \ No newline at end of file diff --git a/locales/en/common.json b/locales/en/common.json index b7504a6f..379d6f5a 100644 --- a/locales/en/common.json +++ b/locales/en/common.json @@ -94,5 +94,24 @@ "awaitingsubmissiondetails-viewall-title": "View all appeals awaiting submission", "myrepresentations-viewall-title": "View all representations awaiting submission", "watchedcases-viewall-title": "View all watched cases", - "mysubmittedreps-viewall-title": "View all submitted representations" + "mysubmittedreps-viewall-title": "View all submitted representations", + "contact-us-title": "Contact Us", + "contact-us-email-label": "Your email address", + "contact-us-contact-type-label": "What do you want to contact us about?", + "contact-us-contact-body-label": "What do you want to ask?", + "contact-us-send-button": "Send your question", + "contact-us-clear-form-button": "Clear form", + "contact-us-thank-you-title": "Thank you for your enquiry", + "contact-us-thank-you-sub": "We’ll get back to you as soon as we can.", + "contact-us-para": "Lorem ipsum dolor sit amet,consectetur adipiscing elit.Nulla congue leo ac quam pulvinar, id vulputate libero volutpat. Maecenas ut odio id nisl laoreet dictum. Nam faucibus, leo vitae egestas lacinia, enim tortor bibendum lorem, ut tincidunt lacus sapien quis lorem. Aenean interdum dolor augue, ac cursus lectus suscipit vitae.", + "contact-us-select-plq": "Planning legislation query", + "contact-us-select-ipq": "Infrastructure procedure query", + "contact-us-select-pcpq": "Planning casework procedure query", + "contact-us-select-pi": "Portal Issues", + "contact-us-select-appadvice": "Appeal submission advice", + "contact-us-select-repadvice": "Representation submission advice", + "contact-us-select-ceq": "Casework Events Query", + "contact-us-select-other": "Any Other Enquiries", + "contact-us-select-postdec": "Post Decision", + "contact-us-select-comp": "Complaints/Complements" } \ No newline at end of file diff --git a/pages/contactus.js b/pages/contactus.js index c6901093..7de8951d 100644 --- a/pages/contactus.js +++ b/pages/contactus.js @@ -65,21 +65,36 @@ const RenderPickList = ({ - - - + + + + - - + + + + - - - - @@ -376,35 +391,27 @@ let ContactUs = (props) => {

- Contact us{" "} + {t("common:contact-us-title")}

{formSubmitted ? (

- Thank you for your enquiry + {t( + "common:contact-us-thank-you-title" + )}

- We’ll get back to you as soon as - we can. + {t( + "common:contact-us-thank-you-sub" + )}
) : ( <>

- Lorem ipsum dolor sit amet, - consectetur adipiscing elit. - Nulla congue leo ac quam - pulvinar, id vulputate libero - volutpat. Maecenas ut odio id - nisl laoreet dictum. Nam - faucibus, leo vitae egestas - lacinia, enim tortor bibendum - lorem, ut tincidunt lacus sapien - quis lorem. Aenean interdum - dolor augue, ac cursus lectus - suscipit vitae.{" "} + {t("common:contact-us-para")}

{ { name="typeOfContact" id="typeOfContact" component={RenderPickList} - label="What do you want to contact us about?" + label={t( + "common:contact-us-contact-type-label" + )} validate={[required]} />
@@ -440,7 +451,9 @@ let ContactUs = (props) => { name="contactbody" id="contactbody" component={RenderMultiline} - label="What do you want to ask?" + label={t( + "common:contact-us-contact-body-label" + )} rows={10} cols={80} validate={[required]} @@ -449,14 +462,18 @@ let ContactUs = (props) => { type="submit" className="govuk-button" > - Send your question + {t( + "common:contact-us-send-button" + )} diff --git a/pages/myportal/contactus.js b/pages/myportal/contactus.js index 055f379e..ff483ac7 100644 --- a/pages/myportal/contactus.js +++ b/pages/myportal/contactus.js @@ -65,21 +65,36 @@ const RenderPickList = ({ - - - + + + + - - + + + + - - - -
@@ -383,28 +398,20 @@ let ContactUs = (props) => { {formSubmitted ? (

- Thank you for your enquiry + {t( + "common:contact-us-thank-you-title" + )}

- We’ll get back to you as soon as - we can. + {t( + "common:contact-us-thank-you-sub" + )}
) : ( <>

- Lorem ipsum dolor sit amet, - consectetur adipiscing elit. - Nulla congue leo ac quam - pulvinar, id vulputate libero - volutpat. Maecenas ut odio id - nisl laoreet dictum. Nam - faucibus, leo vitae egestas - lacinia, enim tortor bibendum - lorem, ut tincidunt lacus sapien - quis lorem. Aenean interdum - dolor augue, ac cursus lectus - suscipit vitae.{" "} + {t("common:contact-us-para")}

{ { name="typeOfContact" id="typeOfContact" component={RenderPickList} - label="What do you want to contact us about?" + label={t( + "common:contact-us-contact-type-label" + )} validate={[required]} />
@@ -440,7 +451,9 @@ let ContactUs = (props) => { name="contactbody" id="contactbody" component={RenderMultiline} - label="What do you want to ask?" + label={t( + "common:contact-us-contact-body-label" + )} rows={10} cols={80} validate={[required]} @@ -449,14 +462,18 @@ let ContactUs = (props) => { type="submit" className="govuk-button" > - Send your question + {t( + "common:contact-us-send-button" + )}