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: 4334fdd441cbca8d9fac8dfa8fd49478fd01cd847eb29707872abf0dd8c523d1
4
- data.tar.gz: fe3f84de2e16d964fb9e7567ce52e8509258f833cc291fee28f54be4c4b8bd8c
3
+ metadata.gz: dafa42cbe074f0cac7f3d82ad2475eee0cbd895e755279ff94a0fb8862d0f7c2
4
+ data.tar.gz: 2b06381bc10381652f927ce42a46dc3d1a008b3e78c26646816b6f4809bd2605
5
5
  SHA512:
6
- metadata.gz: e6776dd162047045dbad8f70cda8d7eae8cc8e66321d607f614daf49c410d29b40c8cf718c6c04c27756bfa05382a58fe70b94633a49cbce7e4bbd5934006c7f
7
- data.tar.gz: d9411dfa23e431152880d95f455d42d6ac326cae14eddb0f905dcdef5a68e1b19b9affb3407e9c6052ed5f813131ec5cf68a8398d0899bcd150bb35bf0ad85aa
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
 
@@ -234,8 +234,8 @@ en:
234
234
  href: "/coronavirus"
235
235
  - label: Find a job
236
236
  href: "/find-a-job"
237
- - label: 'Personal tax account: sign in'
238
- href: "/personal-tax-account"
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
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "29.12.1".freeze
2
+ VERSION = "29.13.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 29.12.1
4
+ version: 29.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev