-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit d181733.
- Loading branch information
Showing
18 changed files
with
163 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters