Skip to content

Commit

Permalink
Merge branch 'main' into OLH-1154
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfajemisincabinetoffice committed Oct 25, 2023
2 parents 9514918 + 7e9ff5f commit f73219c
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 95 deletions.
16 changes: 8 additions & 8 deletions deploy/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ Mappings:
SUPPORTTRIAGEPAGE: "1"
SUPPORTWEBCHATDEMO: "1"
WEBCHATSOURCEURL: "https://uat-chat-loader.smartagent.app/loader/main.js"
SUPPORTWEBCHATCONTACT: "1"
SUPPORTPHONECONTACT: "1"
SHOWCONTACTGUIDANCE: "1"
SUPPORTWEBCHATCONTACT: "0"
SUPPORTPHONECONTACT: "0"
SHOWCONTACTGUIDANCE: "0"
CONTACTEMAILSERVICEURL: "https://signin.staging.account.gov.uk/contact-us-from-triage-page"
build:
NODEENV: "production"
Expand All @@ -165,9 +165,9 @@ Mappings:
SUPPORTTRIAGEPAGE: "1"
SUPPORTWEBCHATDEMO: "1"
WEBCHATSOURCEURL: "https://uat-chat-loader.smartagent.app/loader/main.js"
SUPPORTWEBCHATCONTACT: "1"
SUPPORTPHONECONTACT: "1"
SHOWCONTACTGUIDANCE: "1"
SUPPORTWEBCHATCONTACT: "0"
SUPPORTPHONECONTACT: "0"
SHOWCONTACTGUIDANCE: "0"
CONTACTEMAILSERVICEURL: "https://signin.staging.account.gov.uk/contact-us-from-triage-page"
staging:
NODEENV: "production"
Expand Down Expand Up @@ -208,7 +208,7 @@ Mappings:
SUPPORTWEBCHATDEMO: "1"
WEBCHATSOURCEURL: "https://uat-chat-loader.smartagent.app/loader/main.js"
SUPPORTWEBCHATCONTACT: "0"
SUPPORTPHONECONTACT: "0"
SUPPORTPHONECONTACT: "1"
SHOWCONTACTGUIDANCE: "1"
CONTACTEMAILSERVICEURL: "https://signin.integration.account.gov.uk/contact-us-from-triage-page"
production:
Expand All @@ -225,7 +225,7 @@ Mappings:
ANALYTICSCOOKIEDOMAIN: "account.gov.uk"
SERVICEDOMAIN: "account.gov.uk"
LOGSLEVEL: "info"
SUPPORTTRIAGEPAGE: "0"
SUPPORTTRIAGEPAGE: "1"
SUPPORTWEBCHATDEMO: "0"
WEBCHATSOURCEURL: "0"
SUPPORTWEBCHATCONTACT: "0"
Expand Down
169 changes: 103 additions & 66 deletions src/components/contact-govuk-one-login/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,97 +2,134 @@
{% from "govuk/components/inset-text/macro.njk" import govukInsetText %}
{% set pageTitleName = 'pages.contact.title' | translate %}
{% set hideAccountNavigation = true %}
{% set hidePhaseBanner = true %}
{% set languageToggle = true %}
{% block pageContent %}

{% if contactWebchatEnabled %}
<script id="smartagent" type="module" defer
src="{{ webchatSource }}"
data-company="hgsgds" data-brand="hgsgds">
</script>
{% endif %}

<h1 class="govuk-heading-xl">{{'pages.contact.header' | translate}}</h1>
{% if showContactGuidance %}
{% set secondaryContactMethodEnabled = contactPhoneEnabled or contactWebchatEnabled %}
{% set emailBlock %}
<section>
{% set section1Paragraphs = 'pages.contact.section1.paragraphs' | translate({ returnObjects: true }) %}
{% set section1Links = 'pages.contact.section1.links' | translate({ returnObjects: true }) %}
<h2 class="govuk-heading-l">{{'pages.contact.section1.heading' | translate}}</h2>
{% for paragraph in section1Paragraphs %}
<p class="govuk-body">{{ paragraph }}</p>
{% endfor %}
{% if section1Links.length %}
<ul class="govuk-list govuk-list--bullet">
{% for link in section1Links %}
<li><a class="govuk-link" href="{{link["href"]}}">{{link["text"]}}</a></li>
{% endfor %}
</ul>
{% if secondaryContactMethodEnabled %}
<h3 class="govuk-heading-m">{{'pages.contact.section3.email.heading' | translate }}</h3>
{% endif %}
{% set emailParagraphs = 'pages.contact.section3.email.paragraphs' | translate({ returnObjects: true }) %}
{% for paragraph in emailParagraphs %}
<p class="govuk-body">{{ paragraph | safe | replace('[emailServiceLinkHref]', contactEmailServiceUrl | translate ) }}</p>
{% endfor %}
</section>
{% endif %}
{% endset %}

<section>
<h2 class="govuk-heading-l">{{'pages.contact.section2.heading' | translate}}</h2>
{% set section2Paragraphs = 'pages.contact.section2.paragraphs' | translate({ returnObjects: true }) %}
{% for paragraph in section2Paragraphs %}
{% set refCodeBlock %}
{% set refCodeBlockParagraphs = 'pages.contact.refCodeBlock.paragraphsWebchat' | translate({ returnObjects: true }) if contactWebchatEnabled else 'pages.contact.refCodeBlock.paragraphsNoWebchat' | translate({ returnObjects: true }) %}
{% for paragraph in refCodeBlockParagraphs %}
<p class="govuk-body">{{ paragraph }}</p>
{% endfor %}

<p class="govuk-body contact-reference">
{{'pages.contact.section2.refCode' | translate}}
{{'pages.contact.refCodeBlock.refCode' | translate}}
<strong class="contact-reference__code">{{ referenceCode }}</strong>
</p>
</section>

<section>
<h2 class="govuk-heading-l">{{'pages.contact.section3.heading' | translate}}</h2>
{% if contactWebchatEnabled %}
<section>
{% set webchatParagraphs = 'pages.contact.section3.webchat.paragraphs' | translate({ returnObjects: true }) %}
{% endset %}

<h3 class="govuk-heading-m">{{'pages.contact.section3.webchat.heading' | translate}}</h3>
{% set phoneBlock %}
{% set phoneParagraphs1 = 'pages.contact.section3.phone.paragraphs' | translate({ returnObjects: true }) %}
{% set phoneParagraphs2 = 'pages.contact.section3.phone.paragraphs2' | translate({ returnObjects: true }) %}
{% set insetTextHtml %}
{% set insetTextParagraphs = 'pages.contact.section3.phone.insetText.paragraphs' | translate({ returnObjects: true }) %}
{% for paragraph in insetTextParagraphs %}
<p class="govuk-body">{{ paragraph | safe }}</p>
{% endfor %}
{% endset %}

{% for paragraph in webchatParagraphs %}
<p class="govuk-body">{{ paragraph | safe | replace('[useWebchatLinkHref]', 'pages.contact.section3.webchat.useWebchatLinkHref' | translate ) }}</p>
<section>
<h3 class="govuk-heading-m">{{'pages.contact.section3.phone.heading' | translate}}</h3>
{% if not contactWebchatEnabled %}
{{refCodeBlock | safe }}
{% else %}
{% for paragraph in phoneParagraphs1 %}
<p class="govuk-body">{{ paragraph }}</p>
{% endfor %}
</section>
{% endif %}
{% endif %}

{% if contactPhoneEnabled %}
<section>
{% set phoneParagraphs1 = 'pages.contact.section3.phone.paragraphs' | translate({ returnObjects: true }) %}
{% set phoneParagraphs2 = 'pages.contact.section3.phone.paragraphs2' | translate({ returnObjects: true }) %}
{% set insetTextHtml %}
{% set insetTextParagraphs = 'pages.contact.section3.phone.insetText.paragraphs' | translate({ returnObjects: true }) %}
{% for paragraph in insetTextParagraphs %}
<p class="govuk-body">{{ paragraph | safe }}</p>
{% endfor %}
{% endset %}
{{ govukInsetText({
html: insetTextHtml
}) }}

<h3 class="govuk-heading-m">{{'pages.contact.section3.phone.heading' | translate}}</h3>
{% for paragraph in phoneParagraphs2 %}
<p class="govuk-body">{{ paragraph | safe | replace('[callChargesLinkHref]', 'pages.contact.section3.phone.callChargesLinkHref' | translate ) }}</p>
{% endfor %}
</section>
{% endset %}

{% for paragraph in phoneParagraphs1 %}
<p class="govuk-body">{{ paragraph }}</p>
{% endfor %}

{{ govukInsetText({
html: insetTextHtml
}) }}
{# START page content #}

{% block pageContent %}

<h1 class="govuk-heading-xl">{{'pages.contact.header' | translate}}</h1>

{% for paragraph in phoneParagraphs2 %}
<p class="govuk-body">{{ paragraph | safe | replace('[callChargesLinkHref]', 'pages.contact.section3.phone.callChargesLinkHref' | translate ) }}</p>
{% if not showContactGuidance and not contactWebchatEnabled and not contactPhoneEnabled %}
{# if everything is disabled, only show the contact form option #}
{{ emailBlock | safe }}
{% else %}
{% if showContactGuidance %}
<section>
{% set section1Paragraphs = 'pages.contact.section1.paragraphs' | translate({ returnObjects: true }) %}
{% set section1Links = 'pages.contact.section1.links' | translate({ returnObjects: true }) %}
<h2 class="govuk-heading-l">{{'pages.contact.section1.heading' | translate}}</h2>
{% for paragraph in section1Paragraphs %}
<p class="govuk-body">{{ paragraph }}</p>
{% endfor %}
{% if section1Links.length %}
<ul class="govuk-list govuk-list--bullet">
{% for link in section1Links %}
<li><a class="govuk-link" href="{{link["href"]}}">{{link["text"]}}</a></li>
{% endfor %}
</ul>
{% endif %}
</section>
<hr class="govuk-section-break govuk-section-break--m">
{% endif %}

{% if contactPhoneEnabled and contactWebchatEnabled %}
<section>
<h2 class="govuk-heading-l">{{'pages.contact.section2.heading' | translate}}</h2>
{{ refCodeBlock | safe }}
</section>
<hr class="govuk-section-break govuk-section-break--m">
{% endif %}

<section>
<h3 class="govuk-heading-m">{{'pages.contact.section3.email.heading' | translate}}</h3>
{% set emailParagraphs = 'pages.contact.section3.email.paragraphs' | translate({ returnObjects: true }) %}
<h2 class="govuk-heading-l">{% if secondaryContactMethodEnabled %}{{'pages.contact.section3.headingMany' | translate}}{% else %}{{'pages.contact.section3.headingOne' | translate }}{% endif %}</h2>
{% if contactWebchatEnabled %}
<section>
{% set webchatParagraphs = 'pages.contact.section3.webchat.paragraphs' | translate({ returnObjects: true }) %}

{% for paragraph in emailParagraphs %}
<p class="govuk-body">{{ paragraph | safe | replace('[emailServiceLinkHref]', contactEmailServiceUrl | translate ) }}</p>
<h3 class="govuk-heading-m">{{'pages.contact.section3.webchat.heading' | translate}}</h3>

{% for paragraph in webchatParagraphs %}
<p class="govuk-body">{{ paragraph | safe | replace('[useWebchatLinkHref]', 'pages.contact.section3.webchat.useWebchatLinkHref' | translate ) }}</p>
{% endfor %}
</section>
{% endif %}

{% if contactPhoneEnabled %}
{{ phoneBlock | safe }}
{% endif %}

{{ emailBlock | safe }}
</section>
<hr class="govuk-section-break govuk-section-break--m">
<section>
{% set section4Paragraphs = 'pages.contact.section4.paragraphs' | translate({ returnObjects: true }) %}
<h2 class="govuk-heading-l">{{'pages.contact.section4.heading' | translate}}</h2>
{% for paragraph in section4Paragraphs %}
<p class="govuk-body">{{ paragraph | safe }}</p>
{% endfor %}
</section>
</section>
{% endif %}

{% if contactWebchatEnabled %}
<script id="smartagent" type="module" defer
src="{{ webchatSource }}"
data-company="hgsgds" data-brand="hgsgds">
</script>
{% endif %}
{% endblock %}
88 changes: 86 additions & 2 deletions src/locales/cy/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,92 @@
}
},
"contact": {
"title": "Get help with GOV.UK One Login",
"header": "Contact GOV.UK One Login"
"title": "Cysylltu â GOV.UK One Login",
"header": "Cysylltu â GOV.UK One Login",
"section1": {
"heading": "Cyn i chi gysylltu â ni",
"paragraphs": [
"Darllenwch ein canllaw os ydych yn cael problem gyda:"
],
"links": [
{
"href": "",
"text": "Defnyddio'r ap GOV.UK ID Check app"
},{
"href": "",
"text": "Profi eich hunaniaeth gyda GOV.UK One Login drwy ateb cwestiynau diogelwch"
},{
"href": "",
"text": "Newid y manylion mewngofnodi ar gyfer eich GOV.UK One Login"
},{
"href": "",
"text": "Cael cod diogelwch ar gyfer GOV.UK One Login"
}, {
"href": "",
"text": "Dileu eich GOV.UK One Login"
}
]
},
"section2": {
"heading": "Pan fyddwch yn cysylltu â ni"
},
"refCodeBlock": {
"paragraphsWebchat": [
"Os ydych yn ffonio neu'n defnyddio gwesgwrs i gysylltu â'r tîm GOV.UK One Login, gofynnir i chi am god cyfeirinod.",
"Mae'r cod hwn yn ein helpu i weld lle y gallech fod yn cael problem."
],
"paragraphsNoWebchat": [
"Pan fyddwch yn cysylltu â ni dros y ffôn, gofynnir i chi am god cyfeirio.",
"Mae'r cod hwn yn ein helpu i weld lle y gallech fod yn cael problem."
],
"refCode": "Eich cod cyfeirnod yw:"
},
"section3": {
"headingOne": "Sut i gysylltu â ni",
"headingMany": "Ffyrdd o gysylltu â ni",
"webchat": {
"heading": "Gwesgwrs",
"paragraphs": [
"Gofynnwch i gynorthwyydd digidol GOV.UK One Login i ddod o hyd i wybodaeth i'ch helpu chi neu sgwrsiwch ag ymgynghorydd.",
"Nid yw ein gwesgwrs yn gwbl hygyrch eto. Rydym yn gweithio i'w wella.Gallwch ddarganfod mwy am <a class=\"govuk-link\" href=\"link-to-statement\">ein datganiad hygyrchedd</a>.",
"Oriau agor: </br>Dydd Llun i ddydd Gwener, 8am i 8pm <br>Penwythnosau a gwyliau cyhoeddus, 9am i 5:30pm",
"<a class=\"govuk-link\" href=\"[useWebchatLinkHref]\">Defnyddio gwesgwrs</a>"
],
"useWebchatLinkHref":"/webchat"
},
"phone": {
"heading": "Ffôn",
"paragraphs": [
"Byddwch angen eich cod cyfeirnod pan fyddwch yn ffonio."
],
"insetText":{
"paragraphs": [
"O'r DU:</br><strong>0300 123 2345</strong>",
"Y tu allan i'r DU:</br><strong>+44 117 393 3928</strong>"
]
},
"paragraphs2": [
"Oriau agor:</br>Dydd Llun i ddydd Gwener, 8am i 8pm <br>Penwythnosau a gwyliau cyhoeddus, 9am i 5:30pm",
"<a class=\"govuk-link\" href=\"[callChargesLinkHref]\">Darganfyddwch fwy am gostau galwadau</a>"
],
"callChargesLinkHref": "https://www.gov.uk/call-charges"
},
"email": {
"heading": "E-bost",
"paragraphs": [
"<a class=\"govuk-link\" href=\"[emailServiceLinkHref]\">Cwblhewch y ffurflen gyswllt</a> i ofyn am help.",
"Byddwn yn ateb drwy e-bost o fewn 2 ddiwrnod gwaith.",
"Byddwn yn ymateb yn ystod oriau swyddfa.",
"Oriau swyddfa: </br>Dydd Llun i ddydd Gwener, 9:30am i 5:30pm"
]
}
},
"section4": {
"heading": "Sut rydym yn defnyddio eich gwybodaeth",
"paragraphs": [
"I ddarganfod pa wybodaeth rydym yn ei gadw pan fyddwch yn cysylltu â ni a sut rydym yn ei defnyddio, gweler <a href=\"https://signin.account.gov.uk/privacy-notice\" class=\"govuk-link\">hysbysiad preifatrwydd GOV.UK One Login</a>"
]
}
},
"9fduJ6KAE8WwCb1VCKp788BC8mM" : {
"header": "Darganfod corff asesu cydymffurfiaeth marchnad y DU",
Expand Down
Loading

0 comments on commit f73219c

Please sign in to comment.