-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #891 from GSA/main
Production deploy 10/31/23
- Loading branch information
Showing
98 changed files
with
2,004 additions
and
2,118 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
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,65 @@ | ||
window.GOVUK = window.GOVUK || {}; | ||
window.GOVUK.Modules = window.GOVUK.Modules || {}; | ||
window.GOVUK.Modules.TimeoutPopup = window.GOVUK.Modules.TimeoutPopup || {}; | ||
|
||
(function(global) { | ||
"use strict"; | ||
|
||
const sessionTimer = document.getElementById("sessionTimer"); | ||
let intervalId = null; | ||
|
||
function checkTimer(timeTillSessionEnd) { | ||
var now = new Date().getTime(); | ||
var difference = timeTillSessionEnd - now; | ||
var minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60)); | ||
var seconds = Math.floor((difference % (1000 * 60)) / 1000); | ||
document.getElementById("timeLeft").innerHTML = + minutes + "m " + seconds + "s"; | ||
showTimer(); | ||
document.getElementById("logOutTimer").addEventListener("click", signoutUser); | ||
document.getElementById("extendSessionTimer").addEventListener("click", extendSession); | ||
if (difference < 0) { | ||
clearInterval(intervalId); | ||
intervalId = null; | ||
closeTimer(); | ||
expireUserSession(); | ||
} | ||
} | ||
|
||
function expireUserSession() { | ||
var signOutLink = '/sign-out?next=' + window.location.pathname; | ||
window.location.href = signOutLink; | ||
|
||
} | ||
|
||
function signoutUser() { | ||
window.location.href = '/sign-out'; | ||
} | ||
|
||
function extendSession() { | ||
window.location.reload(); | ||
} | ||
|
||
function showTimer() { | ||
sessionTimer.showModal(); | ||
} | ||
|
||
function closeTimer() { | ||
sessionTimer.close(); | ||
} | ||
|
||
function setSessionTimer() { | ||
var timeTillSessionEnd = new Date().getTime() + (5 * 60 * 1000); | ||
intervalId = setInterval(checkTimer, 1000, timeTillSessionEnd); | ||
} | ||
|
||
if (document.getElementById("timeLeft") !== null) { | ||
setTimeout(setSessionTimer, 25 * 60 * 1000); | ||
} | ||
|
||
global.GOVUK.Modules.TimeoutPopup.checkTimer = checkTimer; | ||
global.GOVUK.Modules.TimeoutPopup.expireUserSession = expireUserSession; | ||
global.GOVUK.Modules.TimeoutPopup.signoutUser = signoutUser; | ||
global.GOVUK.Modules.TimeoutPopup.extendSession = extendSession; | ||
global.GOVUK.Modules.TimeoutPopup.showTimer = showTimer; | ||
global.GOVUK.Modules.TimeoutPopup.closeTimer = closeTimer; | ||
})(window); |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div {%- if params.id %} id="{{ params.id }}"{% endif %} class="govuk-inset-text {%- if params.classes %} {{ params.classes }}{% endif %}" | ||
<div {%- if params.id %} id="{{ params.id }}"{% endif %} class="bg-base-lightest padding-y-1 padding-x-2 {%- if params.classes %} {{ params.classes }}{% endif %}" | ||
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}> | ||
{{ params.html | safe if params.html else params.text }} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<h1 class='banner-title'> | ||
Message too long | ||
</h1> | ||
<p class="usa-body"> | ||
Text messages cannot be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters. | ||
Your message is {{ template.content_count }} characters. | ||
</p> | ||
<div class="usa-alert usa-alert--error" role="alert"> | ||
<div class="usa-alert__body"> | ||
<h1 class="usa-alert__heading">Message too long</h1> | ||
<p class="usa-alert__text"> | ||
Text messages cannot be longer than {{ SMS_CHAR_COUNT_LIMIT }} characters. | ||
Your message is {{ template.content_count }} characters. | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: bad recipients" data-error-label="{{ upload_id }}"> | ||
You cannot send to | ||
{{ 'this' if count_of_recipients == 1 else 'these' }} | ||
{{ template_type_label }} | ||
{%- if count_of_recipients != 1 -%} | ||
{{ 'es' if 'email address' == template_type_label else 's' }} | ||
{%- endif %} | ||
</h1> | ||
<p class="usa-body"> | ||
In <a class="usa-link" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you can only | ||
send to yourself and members of your team | ||
</p> | ||
<div class="usa-alert usa-alert--error" role="alert"> | ||
<div class="usa-alert__body"> | ||
<h1 class="usa-alert__heading"> | ||
You cannot send to | ||
{{ 'this' if count_of_recipients == 1 else 'these' }} | ||
{{ template_type_label }} | ||
{%- if count_of_recipients != 1 -%} | ||
{{ 'es' if 'email address' == template_type_label else 's' }} | ||
{%- endif %} | ||
</h1> | ||
<p class="usa-alert__text"> | ||
In <a class="usa-link" href="{{ url_for('.trial_mode_new') }}">trial mode</a> you can only | ||
send to yourself and members of your team | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<h1 class='banner-title' data-module="track-error" data-error-type="File previously sent" data-error-label="{{ upload_id }}"> | ||
These messages have already been sent today | ||
</h1> | ||
<p class="usa-body"> | ||
If you need to resend them, rename the file and upload it again. | ||
</p> | ||
<div class="usa-alert usa-alert--error" role="alert"> | ||
<div class="usa-alert__body"> | ||
<h1 class="usa-alert__heading">These messages have already been sent today</h1> | ||
<p class="usa-alert__text"> | ||
If you need to resend them, rename the file and upload it again. | ||
</p> | ||
</div> | ||
</div> |
Oops, something went wrong.