hof 20.3.7-timeout-beta → 20.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +12 -12
- package/frontend/govuk-template/build/govuk_template.html +3 -4
- package/frontend/template-partials/translations/src/en/buttons.json +0 -1
- package/frontend/template-partials/translations/src/en/errors.json +0 -4
- package/frontend/template-partials/views/layout.html +1 -2
- package/frontend/template-partials/views/partials/warn.html +7 -0
- package/frontend/themes/gov-uk/client-js/index.js +0 -1
- package/package.json +2 -2
- package/sandbox/assets/scss/app.scss +1 -115
- package/sandbox/package.json +1 -1
- package/sandbox/yarn.lock +1 -6
- package/.nyc_output/2194bc4f-7454-4356-80e2-e52a7dc798aa.json +0 -1
- package/.nyc_output/processinfo/2194bc4f-7454-4356-80e2-e52a7dc798aa.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/frontend/govuk-template/govuk_template_generated.html +0 -103
- package/frontend/template-partials/views/partials/session-timeout-warning.html +0 -27
- package/frontend/themes/gov-uk/client-js/dialog/index.js +0 -361
- package/frontend/themes/gov-uk/client-js/dialog/utils.js +0 -114
- package/middleware/session-timeout.js +0 -23
- package/sandbox/apps/sandbox/behaviours/extend-session.js +0 -9
- package/sandbox/apps/sandbox/translations/en/default.json +0 -220
- package/sandbox/public/css/app.css +0 -9496
- package/sandbox/public/images/icons/icon-caret-left.png +0 -0
- package/sandbox/public/images/icons/icon-complete.png +0 -0
- package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
- package/sandbox/public/js/bundle.js +0 -46860
package/README.md
CHANGED
@@ -311,7 +311,7 @@ my-application/translations/en/default.json
|
|
311
311
|
}
|
312
312
|
```
|
313
313
|
|
314
|
-
#
|
314
|
+
#HOF Controller
|
315
315
|
|
316
316
|
Implements a request pipeline for GET and POST of forms, with input cleaning/formatting and validation.
|
317
317
|
|
@@ -482,13 +482,13 @@ let error = new ErrorClass(this.missingDoB, {
|
|
482
482
|
});
|
483
483
|
```
|
484
484
|
|
485
|
-
##
|
485
|
+
##hof-behaviour-session
|
486
486
|
|
487
487
|
HOF Behaviour for reading and writing to the session
|
488
488
|
|
489
|
-
##
|
489
|
+
##Usage
|
490
490
|
|
491
|
-
###
|
491
|
+
###With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
492
492
|
|
493
493
|
```js
|
494
494
|
const mix = require('mixwith').mix;
|
@@ -502,7 +502,7 @@ class MyController extends mix(BaseController).with(Session) {
|
|
502
502
|
|
503
503
|
`MyController` now extends `hof-form-controller` and has `hof-behaviour-session` functionality mixed in.
|
504
504
|
|
505
|
-
##
|
505
|
+
##Functionality
|
506
506
|
|
507
507
|
This mixin extends `hof-form-controller` by persisting the form data to the `sessionModel` - assuming the [session-model](https://github.com/UKHomeOfficeForms/hof-form-wizard/blob/master/lib/middleware/session-model.js) middleware has been applied.
|
508
508
|
|
@@ -516,13 +516,13 @@ The following form controller methods are used:
|
|
516
516
|
- `missingPrereqHandler(req, res)` - Error handler called when a `MISSING_PREREQ` error is thrown from the [check-progress](https://github.com/UKHomeOfficeForms/hof-form-wizard/blob/master/lib/middleware/check-progress.js) middleware. This occurs if a step is visited out of sequence. This error handler causes the user to be redirected to the last completed step, or the first step if none have been completed.
|
517
517
|
- `errorHandler(err, req, res, next)` - checks if `err.code` is `MISSING_PREREQ`, if so calls `missingPrereqHandler`, if not calls `super` to hand over to parent error handler.
|
518
518
|
|
519
|
-
##
|
519
|
+
##behaviour-hooks
|
520
520
|
|
521
521
|
HOF Behaviour enabling lifecycle hooks for extending functionality in main form pipeline.
|
522
522
|
|
523
|
-
##
|
523
|
+
##Usage
|
524
524
|
|
525
|
-
###
|
525
|
+
###With [mixwith.js](https://github.com/justinfagnani/mixwith.js)
|
526
526
|
|
527
527
|
```js
|
528
528
|
const mix = require('mixwith').mix;
|
@@ -536,25 +536,25 @@ class MyController extends mix(BaseController).with(Hooks) {
|
|
536
536
|
|
537
537
|
`MyController` now extends `hof-form-controller` and has `hof-behaviour-hooks` functionality mixed in.
|
538
538
|
|
539
|
-
##
|
539
|
+
##Functionality
|
540
540
|
|
541
541
|
The following hooks are currently supported, the methods are GET/POST pipeline methods from `hof-form-controller`:
|
542
542
|
|
543
|
-
####
|
543
|
+
####GET
|
544
544
|
|
545
545
|
- `_getErrors` - `'pre-getErrors', 'post-getErrors'`
|
546
546
|
- `_getValues` - `'pre-getValues', 'post-getValues'`
|
547
547
|
- `_locals` - `'pre-locals', 'post-locals'`
|
548
548
|
- `render` - `'pre-render', 'post-render'`
|
549
549
|
|
550
|
-
####
|
550
|
+
####POST
|
551
551
|
|
552
552
|
- `_process` - `'pre-process', 'post-process'`
|
553
553
|
- `_validate` - `'pre-validate', 'post-validate'`
|
554
554
|
- `saveValues` - `'pre-saveValues', 'post-saveValues'`
|
555
555
|
- `successHandler` - `'pre-successHandler', 'post-successHandler'`
|
556
556
|
|
557
|
-
###
|
557
|
+
###In field config
|
558
558
|
|
559
559
|
fields.js
|
560
560
|
|
@@ -41,13 +41,12 @@
|
|
41
41
|
<a href="{{{ homepageUrl }}}" title="{{ logoLinkTitle }}" id="logo" class="govuk-header__link govuk-header__link--homepage" target="_blank" data-module="track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
|
42
42
|
<span class="govuk-header__logotype">
|
43
43
|
<!--[if gt IE 8]><!-->
|
44
|
-
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
45
|
-
<path fill="currentColor" fill-rule="evenodd"
|
44
|
+
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg\" viewBox="0 0 32 30" height="30" width="32">
|
45
|
+
<path fill="currentColor" fill-rule="evenodd" 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-1 2.4m-5.9 6.7c-.9.4-2-.1-2.4-1-.4-.9.1-2 1-2.4.9-.4 2 .1 2.4 1s-.1 2-1 2.4m10.8-3.7c-1 .4-2-.1-2.4-1-.4-.9.1-2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-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>
|
46
46
|
</svg>
|
47
47
|
<!--<![endif]-->
|
48
|
-
<!--<![endif]-->
|
49
48
|
<!--[if IE 8]>
|
50
|
-
<img src="{{ assetPath }}images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image" width="
|
49
|
+
<img src="{{ assetPath }}images/govuk-logotype-tudor-crown.png" class="govuk-header__logotype-crown-fallback-image" width="32" height="30" alt="">
|
51
50
|
<![endif]-->
|
52
51
|
</span>
|
53
52
|
<span class="govuk-header__logotype-text">
|
@@ -3,10 +3,6 @@
|
|
3
3
|
"title": "Sorry, something went wrong",
|
4
4
|
"message": "A server exception occurred. Please try again."
|
5
5
|
},
|
6
|
-
"session-warning": {
|
7
|
-
"title": "Your page will time out soon",
|
8
|
-
"message": "To protect your information, this page will time out in 5 minutes.\n\nIf that happens, your progress will not be saved."
|
9
|
-
},
|
10
6
|
"session": {
|
11
7
|
"title": "Sorry, you'll have to start again",
|
12
8
|
"message": "You haven't entered any details for 30 minutes, so we have cleared your information to keep it secure."
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<span class="govuk-phase-banner__text">This is a new service – your <a href="{{feedbackUrl}}{{^feedbackUrl}}https://eforms.homeoffice.gov.uk/outreach/feedback.ofml{{/feedbackUrl}}" class="govuk-link" id="feedback-link" target="_blank">feedback</a> will help us to improve it.</span>
|
20
20
|
</p>
|
21
21
|
</div>
|
22
|
-
{{/feedbackUrl}}
|
22
|
+
{{/feedbackUrl}}
|
23
23
|
<span id="step">
|
24
24
|
{{> partials-back}} <span>{{$step}}{{/step}}</span>
|
25
25
|
</span>
|
@@ -29,7 +29,6 @@
|
|
29
29
|
</div>
|
30
30
|
</main>
|
31
31
|
{{> partials-continue}}
|
32
|
-
{{> partials-session-timeout-warning}}
|
33
32
|
<script type="text/javascript" src="{{assetPath}}/js/bundle.js"></script>
|
34
33
|
</div>
|
35
34
|
{{/main}}
|
@@ -11,7 +11,6 @@ var validation = toolkit.validation;
|
|
11
11
|
var GOVUK = require('govuk-frontend');
|
12
12
|
GOVUK.initAll();
|
13
13
|
window.GOVUK = GOVUK;
|
14
|
-
var dialog = require('./dialog');
|
15
14
|
var skipToMain = require('./skip-to-main');
|
16
15
|
var cookie = require('./govuk-cookies');
|
17
16
|
var cookieSettings = require('./cookieSettings');
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "hof",
|
3
3
|
"description": "A bootstrap for HOF projects",
|
4
|
-
"version": "20.3.7
|
4
|
+
"version": "20.3.7",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "index.js",
|
7
7
|
"author": "HomeOffice",
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"findup": "^0.1.5",
|
58
58
|
"glob": "^7.2.0",
|
59
59
|
"govuk-elements-sass": "^3.1.3",
|
60
|
-
"govuk-frontend": "3.
|
60
|
+
"govuk-frontend": "3.15",
|
61
61
|
"govuk_template_mustache": "^0.26.0",
|
62
62
|
"helmet": "^3.22.0",
|
63
63
|
"hogan-express-strict": "^0.5.4",
|
@@ -7,7 +7,7 @@
|
|
7
7
|
border: 1px solid #ccc;
|
8
8
|
width: 65%;
|
9
9
|
}
|
10
|
-
|
10
|
+
|
11
11
|
.tt-suggestion {
|
12
12
|
padding: 0.5em;
|
13
13
|
|
@@ -25,117 +25,3 @@
|
|
25
25
|
.twitter-typeahead {
|
26
26
|
width: 100%;
|
27
27
|
}
|
28
|
-
|
29
|
-
.hidden {
|
30
|
-
display: none;
|
31
|
-
}
|
32
|
-
|
33
|
-
[role="dialog"] {
|
34
|
-
box-sizing: border-box;
|
35
|
-
padding: 15px;
|
36
|
-
border: 1px solid #000;
|
37
|
-
background-color: #fff;
|
38
|
-
min-height: 100vh;
|
39
|
-
}
|
40
|
-
|
41
|
-
@media screen and (min-width: 640px) {
|
42
|
-
[role="dialog"] {
|
43
|
-
position: absolute;
|
44
|
-
top: 25vh;
|
45
|
-
left: 50vw; /* move to the middle of the screen (assumes relative parent is the body/viewport) */
|
46
|
-
transform: translateX(
|
47
|
-
-50%
|
48
|
-
); /* move backwards 50% of this element's width */
|
49
|
-
min-width: calc(640px - (15px * 2)); /* == breakpoint - left+right margin */
|
50
|
-
min-height: auto;
|
51
|
-
box-shadow: 0 19px 38px rgb(0 0 0 / 12%), 0 15px 12px rgb(0 0 0 / 22%);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
.dialog_form {
|
56
|
-
margin: 15px;
|
57
|
-
}
|
58
|
-
|
59
|
-
.dialog_form .label_text {
|
60
|
-
box-sizing: border-box;
|
61
|
-
padding-right: 0.5em;
|
62
|
-
display: inline-block;
|
63
|
-
font-size: 16px;
|
64
|
-
font-weight: bold;
|
65
|
-
width: 30%;
|
66
|
-
text-align: right;
|
67
|
-
}
|
68
|
-
|
69
|
-
.dialog_form .label_info {
|
70
|
-
box-sizing: border-box;
|
71
|
-
padding-right: 0.5em;
|
72
|
-
font-size: 12px;
|
73
|
-
width: 30%;
|
74
|
-
text-align: right;
|
75
|
-
display: inline-block;
|
76
|
-
}
|
77
|
-
|
78
|
-
.dialog_form_item {
|
79
|
-
margin: 10px 0;
|
80
|
-
font-size: 0;
|
81
|
-
}
|
82
|
-
|
83
|
-
.dialog_form_item .wide_input {
|
84
|
-
box-sizing: border-box;
|
85
|
-
max-width: 70%;
|
86
|
-
width: 27em;
|
87
|
-
}
|
88
|
-
|
89
|
-
.dialog_form_actions {
|
90
|
-
text-align: right;
|
91
|
-
padding: 0 20px 20px;
|
92
|
-
}
|
93
|
-
|
94
|
-
.dialog_close_button {
|
95
|
-
float: right;
|
96
|
-
position: absolute;
|
97
|
-
top: 10px;
|
98
|
-
left: 92%;
|
99
|
-
height: 25px;
|
100
|
-
}
|
101
|
-
|
102
|
-
.dialog_close_button img {
|
103
|
-
border: 0;
|
104
|
-
}
|
105
|
-
|
106
|
-
.dialog_desc {
|
107
|
-
padding: 10px 20px;
|
108
|
-
}
|
109
|
-
|
110
|
-
/* native <dialog> element uses the ::backdrop pseudo-element */
|
111
|
-
|
112
|
-
/* dialog::backdrop, */
|
113
|
-
.dialog-backdrop {
|
114
|
-
display: none;
|
115
|
-
position: fixed;
|
116
|
-
overflow-y: auto;
|
117
|
-
top: 0;
|
118
|
-
right: 0;
|
119
|
-
bottom: 0;
|
120
|
-
left: 0;
|
121
|
-
z-index: 1;
|
122
|
-
}
|
123
|
-
|
124
|
-
@media screen and (min-width: 640px) {
|
125
|
-
.dialog-backdrop {
|
126
|
-
background: rgb(0 0 0 / 30%);
|
127
|
-
}
|
128
|
-
}
|
129
|
-
|
130
|
-
.dialog-backdrop.active {
|
131
|
-
display: block;
|
132
|
-
}
|
133
|
-
|
134
|
-
.no-scroll {
|
135
|
-
overflow-y: auto !important;
|
136
|
-
}
|
137
|
-
|
138
|
-
/* this is added to the body when a dialog is open */
|
139
|
-
.has-dialog {
|
140
|
-
overflow: hidden;
|
141
|
-
}
|
package/sandbox/package.json
CHANGED
package/sandbox/yarn.lock
CHANGED
@@ -130,16 +130,11 @@ is-number@^7.0.0:
|
|
130
130
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
131
131
|
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
132
132
|
|
133
|
-
jquery@>=1.11:
|
133
|
+
jquery@>=1.11, jquery@^3.6.0:
|
134
134
|
version "3.6.0"
|
135
135
|
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.0.tgz#c72a09f15c1bdce142f49dbf1170bdf8adac2470"
|
136
136
|
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
|
137
137
|
|
138
|
-
jquery@^3.6.1:
|
139
|
-
version "3.7.1"
|
140
|
-
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
|
141
|
-
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
|
142
|
-
|
143
138
|
minimatch@^3.0.4:
|
144
139
|
version "3.1.2"
|
145
140
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|