Skip to content

Commit

Permalink
Revert "PP-12021 Upgrade to DS v5"
Browse files Browse the repository at this point in the history
This reverts commit d181733.
  • Loading branch information
iqbalgds committed Sep 17, 2024
1 parent c8359be commit 9f555e0
Show file tree
Hide file tree
Showing 18 changed files with 163 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports = function (grunt) {
dist: {
src: ['public/javascripts/application.js',
'node_modules/promise-polyfill/dist/polyfill.min.js',
'node_modules/govuk-frontend/dist/govuk/all.bundle.js',
'node_modules/govuk-frontend/govuk/all.js',
'app/assets/javascripts/modules/*.js'],
dest: 'public/javascripts/application.js'
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/browsered/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const initialiseAddressCountryAutocomplete = () => {

const toggleButton = (button) => {
if (button) {
button[button.hasAttribute('disabled') ? 'removeAttribute' : 'setAttribute']('disabled', 'disabled')
button[button.getAttribute('disabled') ? 'removeAttribute' : 'setAttribute']('disabled', 'disabled')
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/browsered/web-payments/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const clearErrorSummary = () => {

const toggleWaiting = (paymentMethodSubmitId) => {
const button = document.getElementById(paymentMethodSubmitId)
button[button.hasAttribute('disabled') ? 'removeAttribute' : 'setAttribute']('disabled', 'disabled')
button[button.getAttribute('disabled') ? 'removeAttribute' : 'setAttribute']('disabled', 'disabled')
document.getElementById('spinner').classList.toggle('hidden')
}

Expand Down
21 changes: 21 additions & 0 deletions app/assets/javascripts/modules/analytics-track-click.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var analyticsTrackConfirmClick = function(){
"use strict";

var init = function(analyticsId, type, paymentProvider, amount, hitPage) {
var confirm = document.getElementById('confirm');
confirm.addEventListener('click', function(){
ga('send', {
hitType: 'pageview',
page: hitPage,
'dimension1': analyticsId,
'dimension2': type,
'dimension3': paymentProvider,
'metric1': amount
});
}, false);
};

return {
init: init
};
};
70 changes: 70 additions & 0 deletions app/assets/javascripts/modules/cookie-banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
; (function () {
'use strict'
var root = this
if (typeof root.GOVUK === 'undefined') { root.GOVUK = {} }

/*
Cookie methods
==============
Usage:
Setting a cookie:
GOVUK.cookie('hobnob', 'tasty', { days: 30 });
Reading a cookie:
GOVUK.cookie('hobnob');
Deleting a cookie:
GOVUK.cookie('hobnob', null);
*/
root.GOVUK.cookie = function (name, value, options) {
if (typeof value !== 'undefined') {
if (value === false || value === null) {
return root.GOVUK.setCookie(name, '', { days: -1 })
} else {
return root.GOVUK.setCookie(name, value, options)
}
} else {
return root.GOVUK.getCookie(name)
}
}
root.GOVUK.setCookie = function (name, value, options) {
if (typeof options === 'undefined') {
options = {}
}
var cookieString = name + '=' + value + '; path=/'
if (options.days) {
var date = new Date()
date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000))
cookieString = cookieString + '; expires=' + date.toGMTString()
}
if (document.location.protocol === 'https:') {
cookieString = cookieString + '; Secure'
}
document.cookie = cookieString
}
root.GOVUK.getCookie = function (name) {
var nameEQ = name + '='
var cookies = document.cookie.split(';')
for (var i = 0, len = cookies.length; i < len; i++) {
var cookie = cookies[i]
while (cookie.charAt(0) === ' ') {
cookie = cookie.substring(1, cookie.length)
}
if (cookie.indexOf(nameEQ) === 0) {
return decodeURIComponent(cookie.substring(nameEQ.length))
}
}
return null
}
root.GOVUK.addCookieMessage = function () {
var message = document.querySelector('.js-cookie-banner')
var hasCookieMessage = (message && root.GOVUK.cookie('seen_cookie_message') === null)

if (hasCookieMessage) {
message.style.display = 'block'
root.GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 })
}
}
// add cookie message
if (root.GOVUK && root.GOVUK.addCookieMessage) {
root.GOVUK.addCookieMessage()
}
}).call(this)
2 changes: 1 addition & 1 deletion app/assets/javascripts/modules/form-card-type.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
window.showCardType = function() {
var showCardType = function() {
var form = document.getElementById('card-details')
var acceptedCards = form.querySelector('.accepted-cards')
var cardInput = form.querySelector('#card-no')
Expand Down
3 changes: 2 additions & 1 deletion app/assets/sass/application.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import "govuk-frontend/dist/govuk/all";
@import "govuk-frontend/govuk/all";
@import "govuk-country-and-territory-autocomplete/location-autocomplete";

@import "modules/3ds";
@import "modules/accepted-cards";
@import "modules/accessible-autocomplete";
@import "modules/button-reset";
@import "modules/cookie-message";
@import "modules/cvc";
@import "modules/expiry-date-separator";
@import "modules/input-confirm";
Expand Down
20 changes: 20 additions & 0 deletions app/assets/sass/modules/cookie-message.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.cookie-banner {
box-sizing: border-box;
width: 100%;

padding-top: govuk-spacing(3);
padding-right: govuk-spacing(3);
padding-bottom: govuk-spacing(3);
padding-left: govuk-spacing(3);
background-color: lighten(desaturate(govuk-colour("light-blue"), 8.46), 42.55);

display: none;

p {
margin: 0;
}

@include govuk-media-query($media-type: print) {
display: none !important;
}
}
2 changes: 1 addition & 1 deletion app/middleware/csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const allowUnsafeEvalScripts = process.env.CSP_ALLOW_UNSAFE_EVAL_SCRIPTS === 'tr
const frontendUrl = process.env.FRONTEND_URL || ''
// Script responsible for setting 'js-enabled' class, extends GOV.UK frontend `layout` which we have no control over
// and never changes
const govUkFrontendLayoutJsEnabledScriptHash = '\'sha256-GUQ5ad8JK5KmEWmROf3LZd9ge94daqNvd8xy9YS1iDw=\''
const govUkFrontendLayoutJsEnabledScriptHash = '\'sha256-+6WnXIl4mbFTCARd8N3COQmT3bJJmo32N8q8ZSQAIcU=\''

const CSP_NONE = ['\'none\'']
const CSP_SELF = ['\'self\'']
Expand Down
5 changes: 5 additions & 0 deletions app/views/includes/cookie-message.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="cookie-banner js-cookie-banner">
<div class="govuk-width-container">
<p class="govuk-body-s">GOV.UK Pay uses cookies to make the site simpler. <a class=" govuk-link"href="https://www.payments.service.gov.uk/cookies/">Find out more about cookies</a></p>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/includes/custom.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</span>
</div>
<div class="govuk-header__content">
<span class="govuk-header__service-name">
<span class="govuk-header__link--service-name">
{{ serviceName }}
</span>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/views/includes/scripts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
confirmationForm.addEventListener('submit', function () {
confirmButton.setAttribute('disabled', 'disabled')
})
analyticsTrackConfirmClick().init('{{analytics.analyticsId}}', '{{analytics.type}}', '{{analytics.paymentProvider}}', '{{analytics.amount}}', '{{hitPage}}')
}
{% if allowGooglePay%}
window.googlePayGatewayMerchantID = '{{ googlePayGatewayMerchantID }}'
Expand All @@ -66,4 +67,4 @@
{% endif %}
})
</script>
<script type="module" src="{{ js_path }}"></script>
<script src="{{ js_path }}"></script>
30 changes: 22 additions & 8 deletions app/views/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,33 @@
<div class="govuk-header__container govuk-width-container">
<div class="govuk-header__logo">
<a href="https://www.gov.uk/" class="govuk-header__link govuk-header__link--homepage">
<span class="govuk-header__logotype">
<!--[if gt IE 8]><!-->
<svg
aria-hidden="true"
focusable="false"
role="img"
class="govuk-header__logotype"
class="govuk-header__logotype-crown"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 148 30"
viewBox="0 0 32 30"
height="30"
width="148"
aria-label="GOV.UK"
width="32"
>
<title>GOV.UK</title>
<path d="M22.6 10.4c-1 .4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2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.2-.6-2.5 1.6.9-1.4 2.1-.5 1.9.8-.2 1.1-1.7 2.1-3.5 1.9-2.7-.2-2.9-2.1-2.9-3.6.7-.1 1.9.5 2.9 1.9l.4-4.3c-1.1 1.1-2.1 1.4-3.2 1.4.4-1.2 2.1-3 2.1-3h-5.4s1.7 1.9 2.1 3c-1.1 0-2.1-.2-3.2-1.4l.4 4.3c1-1.4 2.2-2 2.9-1.9-.1 1.5-.2 3.4-2.9 3.6-1.9.2-3.4-.8-3.5-1.9-.2-1.3 1-2.2 1.9-.8.7-2.3-1.2-3-2.5-1.6.9-2.2.9-3.9-1.2-5.5-1.5 2-1.3 3.7.6 5.6-1.2-.7-3.1 0-2 2.3.6-1.4 1.8-1.1 2.1.1.2.9-.3 1.9-1.5 2.1-.9.2-2.4-.5-3.5-3 .6 0 1.2.3 2 .9l-1.2-4c-.3 1.1-.7 1.9-1.1 2.3-.3-.8-.2-1.4 0-2.7l-2.9.9C1.3 23 2.6 25.5 3.7 30c3.7-.5 7.9-.8 12.3-.8"></path>
</svg>
<!--<![endif]-->
<!--[if IE 8]>
<img src="/assets/images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
<![endif]-->
<span class="govuk-header__logotype-text">
GOV.UK
</span>
</span>
</a>
</div>
<div class="govuk-header__content">
<span class="govuk-header__service-name">
<span class="govuk-header__link--service-name">
{{serviceName}}
</span>
</div>
Expand All @@ -56,6 +66,10 @@
{% endif %}
{% endblock %}

{% block bodyStart %}
{% include "includes/cookie-message.njk" %}
{% endblock %}

{% block bodyEnd %}
{# Run JavaScript at end of the <body>, to avoid blocking the initial render. #}
{% include "includes/scripts.njk" %}
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"express": "4.19.x",
"express-rate-limit": "^7.1.4",
"gaap-analytics": "^3.1.0",
"govuk-frontend": "^5.6.0",
"govuk-frontend": "^4.8.0",
"helmet": "^7.1.0",
"hpagent": "^1.2.0",
"i18n": "0.15.x",
Expand Down
8 changes: 4 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const publicCaching = { maxAge: oneYear }

// Define app views
const APP_VIEWS = [
path.join(__dirname, 'node_modules/govuk-frontend/dist/'),
path.join(__dirname, 'node_modules/govuk-frontend/'),
path.join(__dirname, '/app/views')
]

Expand All @@ -58,7 +58,7 @@ function initialiseGlobalMiddleware (app) {
app.set('settings', { getVersionedPath: staticify.getVersionedPath })

app.use(/\/((?!images|public|stylesheets|javascripts).)*/, loggingMiddleware())
app.use(favicon(path.join(__dirname, '/node_modules/govuk-frontend/dist/govuk/assets/images', 'favicon.ico')))
app.use(favicon(path.join(__dirname, '/node_modules/govuk-frontend/govuk/assets/images', 'favicon.ico')))
app.use(staticify.middleware)

app.use(function (req, res, next) {
Expand Down Expand Up @@ -140,9 +140,9 @@ function initialisePublic (app) {
app.use('/stylesheets', express.static(path.join(__dirname, '/public/assets/stylesheets'), publicCaching))

if (process.env.NGINX_CACHING_ENABLED === 'true') {
app.use('/', express.static(path.join(__dirname, '/node_modules/govuk-frontend/dist/govuk/'), publicCaching))
app.use('/', express.static(path.join(__dirname, '/node_modules/govuk-frontend/govuk/'), publicCaching))
} else {
app.use('/', express.static(path.join(__dirname, '/node_modules/govuk-frontend/dist/govuk/')))
app.use('/', express.static(path.join(__dirname, '/node_modules/govuk-frontend/govuk/')))
}

app.use('/public', express.static(path.join(__dirname, '/node_modules/@govuk-pay/pay-js-commons/')))
Expand Down
1 change: 1 addition & 0 deletions test/integration/charge-status.ft.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ describe('chargeTests', function () {
expect($('#card-details #csrf').attr('value')).to.not.be.empty // eslint-disable-line
expect($('#amount').text()).to.eql('£23.45')
expect($('#payment-description').text()).to.contain('Payment Description')
expect($('#govuk-script-analytics')[0].children[0].data).to.contains(`init('${gatewayAccount.analyticsId}', '${gatewayAccount.type}', 'sandbox', '23.45', '')`)
expect($('#card-details').attr('action')).to.eql(frontendCardDetailsPostPath)
})
.end(done)
Expand Down
2 changes: 1 addition & 1 deletion test/test-helpers/html-assertions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const nunjucks = require('nunjucks')
const lodash = require('lodash')

// Global initialisation
const views = ['./app/views', './node_modules/govuk-frontend/dist']
const views = ['./app/views', './node_modules/govuk-frontend']
const environment = nunjucks.configure(views)
const strings = require('./../../locales/en.json')

Expand Down

0 comments on commit 9f555e0

Please sign in to comment.