Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOFF-578-add-session-timeout-popup #421

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"continue": "Continue",
"stay-on-page": "Stay on this page",
"send": "Send",
"change": "Change",
"close": "Close",
Expand Down
1 change: 1 addition & 0 deletions frontend/template-partials/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
</div>
</main>
{{> partials-continue}}
{{> partials-session-timeout-warning}}
<script type="text/javascript" src="{{assetPath}}/js/bundle.js"></script>
</div>
{{/main}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="govuk-warning-text">
<div id="dialog_layer" class="dialog_form">
<div role="dialog"
id="dialog1"
aria-labelledby="dialog1_label"
aria-modal="true"
class="hidden">
<h2 id="dialog1_label" class="govuk-heading-l">
Your page will time out soon
</h2>
<div class="govuk-heading-m">
<p>To protect your information, this page will time out in 5 minutes.</p>
<p>If that happens, your progress will not be saved.</p>
</div>
<div class="dialog_form_actions">
<a href="{{startLink}}" class="govuk-button" role="button">{{#t}}buttons.stay-on-page{{/t}}</a>
</div>
</div>
</div>
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}} type="text/javascript">
console.log("onClick with Timeout")
setTimeout(function() {
openDialog('dialog1', this)
}, 5 * 1000)
</script>
</div>
Loading
Loading