govuk_publishing_components 29.12.1 → 29.13.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dafa42cbe074f0cac7f3d82ad2475eee0cbd895e755279ff94a0fb8862d0f7c2
|
4
|
+
data.tar.gz: 2b06381bc10381652f927ce42a46dc3d1a008b3e78c26646816b6f4809bd2605
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5adab3000ea81b5eaae1506a4d2070ac0e35bf499e4d4ca2500534a087fb67b8e79ac6012faae9590142122f432f7ea36d3c90db819a515d2b623d570e6cb70
|
7
|
+
data.tar.gz: 278fabdee01f0785b2fc2b26dfc07f9c122cd640cf78a8666a846d54d3b44b5e009544c1428d4ed7a24e3ea8af07cfa9d440710e8606bf19e3bc94b46d7e0b2b
|
@@ -19,6 +19,8 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
19
19
|
this.promptSuccessMessage = this.$module.querySelector('.js-prompt-success')
|
20
20
|
this.surveyWrapper = this.$module.querySelector('#survey-wrapper')
|
21
21
|
this.jshiddenClass = 'js-hidden'
|
22
|
+
this.whatDoingInput = this.$module.querySelector('[name=what_doing]')
|
23
|
+
this.whatWrongInput = this.$module.querySelector('[name=what_wrong]')
|
22
24
|
}
|
23
25
|
|
24
26
|
Feedback.prototype.init = function () {
|
@@ -74,6 +76,13 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
74
76
|
this.setHiddenValuesNotUsefulForm(gaClientId)
|
75
77
|
}.bind(this))
|
76
78
|
|
79
|
+
this.somethingIsWrongButton.addEventListener('click', function (e) {
|
80
|
+
this.timerInterval = setInterval(function () {
|
81
|
+
this.timer = this.timer + 1
|
82
|
+
this.timerHoneyPot.setAttribute('value', this.timer)
|
83
|
+
}.bind(this), 1000)
|
84
|
+
}.bind(this))
|
85
|
+
|
77
86
|
// much of the JS needed to support sending the form contents via this script is
|
78
87
|
// unsupported by IE, even IE11. This check causes IE to not intercept form submits
|
79
88
|
// and let them happen normally, which is handled already by the backend
|
@@ -94,6 +103,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
94
103
|
this.revealInitialPrompt()
|
95
104
|
this.setInitialAriaAttributes()
|
96
105
|
this.activeForm.hidden = true
|
106
|
+
clearInterval(this.timerInterval)
|
97
107
|
} else {
|
98
108
|
this.showError(xhr)
|
99
109
|
this.enableSubmitFormButton($form)
|
@@ -142,6 +152,14 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
142
152
|
'<h2>Sorry, we’re unable to send your message as you haven’t given us any information.</h2>',
|
143
153
|
' <p>Please tell us what you were doing or what went wrong</p>'
|
144
154
|
].join('')
|
155
|
+
|
156
|
+
this.timer = 0
|
157
|
+
|
158
|
+
this.timerHoneyPot = document.createElement('input')
|
159
|
+
this.timerHoneyPot.setAttribute('type', 'hidden')
|
160
|
+
this.timerHoneyPot.setAttribute('name', 'timer')
|
161
|
+
this.timerHoneyPot.setAttribute('value', this.timer)
|
162
|
+
this.somethingIsWrongForm.appendChild(this.timerHoneyPot)
|
145
163
|
}
|
146
164
|
|
147
165
|
Feedback.prototype.setHiddenValuesNotUsefulForm = function (gaClientId) {
|
@@ -185,6 +203,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
185
203
|
.focus()
|
186
204
|
} else {
|
187
205
|
this.activeForm = false
|
206
|
+
clearInterval(this.timerInterval)
|
188
207
|
}
|
189
208
|
}
|
190
209
|
|
data/config/locales/en.yml
CHANGED
@@ -234,8 +234,8 @@ en:
|
|
234
234
|
href: "/coronavirus"
|
235
235
|
- label: Find a job
|
236
236
|
href: "/find-a-job"
|
237
|
-
- label: '
|
238
|
-
href: "/
|
237
|
+
- label: 'Check benefits and financial support you can get'
|
238
|
+
href: "/check-benefits-financial-support"
|
239
239
|
- label: 'Universal Credit account: sign in'
|
240
240
|
href: "/sign-in-universal-credit"
|
241
241
|
popular_links_heading: Popular on GOV.UK
|