Skip to content

Commit

Permalink
sign out messaging + more
Browse files Browse the repository at this point in the history
  • Loading branch information
DavDohDWP committed Dec 11, 2024
1 parent dfba052 commit c02ccb1
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% extends "layouts/main.html" %}

{% block pageTitle %}
Content page template – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}

<div class="govuk-!-padding-bottom-4"></div>


{% endblock %}

{% block content %}

<div class="govuk-grid-row">

<div class="hods-loading-spinner">
<div
class="hods-loading-spinner__spinner"
aria-live="polite"
role="status"
></div>

<div class="hods-loading-spinner__content" style="margin-top: 20px">

<h1 class="govuk-heading-m">Please wait while we sign you out</h1>

</div>
</div>

</div>

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<main class="govuk-main-wrapper govuk-main-wrapper--l" id="main-content" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l">You have signed out</h1>
<p class="govuk-body">You haven't entered any details for 20 minutes, so we've cleared your information to keep it secure.</p>
<h1 class="govuk-heading-l">You have been signed out</h1>
<p class="govuk-body">To protect your information, you have been signed out. This is because you did not do anything for 20 minutes.</p>

<div class="govuk-!-padding-bottom-2"></div>

Expand Down
3 changes: 2 additions & 1 deletion app/views/preferences/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ <h4 class="govuk-heading-s">
</h4>

<ul class="govuk-list govuk-list--bullet">
<li><a href="customer-view/additional-screens/you-have-signed-out">You have signed out</a></li>
<li><a href="customer-view/additional-screens/you-have-signed-out">You have signed out (action performed by customer)</a></li>
<li><a href="customer-view/additional-screens/you-have-been-signed-out">You have been signed out</a></li>
<li><a href="customer-view/additional-screens/wait-as-we-sign-you-out">Please wait while we sign you out</a></li>
</ul>


Expand Down
4 changes: 2 additions & 2 deletions app/views/round-9/e6/file-check.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<div class="hods-loading-spinner">
<h1 class="govuk-heading-m" style="text-align: center; margin-bottom: 30px">
Checking your file(s)
Checking your files
</h1>
<div
class="hods-loading-spinner__spinner"
Expand All @@ -30,7 +30,7 @@
></div>
<div class="hods-loading-spinner__content" style="margin-top: 20px">
<p>
This could take up to 30 seconds.
This may take a while. Keep this page open while you wait.
</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/round-9/e6/sending-data.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<div class="hods-loading-spinner">
<h1 class="govuk-heading-m" style="text-align: center; margin-bottom: 30px">
Sending data...
Uploading your files
</h1>
<div
class="hods-loading-spinner__spinner"
Expand All @@ -30,7 +30,7 @@
></div>
<div class="hods-loading-spinner__content" style="margin-top: 20px">
<p>
This could take up to 30 seconds.
This may take a while. Keep this page open while you wait.
</p>
</div>
</div>
Expand Down
22 changes: 19 additions & 3 deletions app/views/round-9/e6/upload-evidence.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,37 @@
<li>not be password protected</li>
</ul>

<p>You will be able to upload a maximum of 100MB in total.</p>
<p>You can upload 100MBs of files in total.</p>

<div class="govuk-!-padding-bottom-2"></div>

<div class="govuk-form-group">
<label class="govuk-label govuk-label--m" for="file-upload">
Upload file(s)
Upload files
</label>

<div id="file-upload-hint" class="govuk-hint">
You can select multiple files.
</div>
<input class="govuk-file-upload moj-multi-file-upload__input" id="file-upload" name="file-upload" type="file" multiple="">

</div>

</fieldset>

<details class="govuk-details">
<summary class="govuk-details__summary">
<span class="govuk-details__summary-text">
What to do if my file is too big to upload?
</span>
</summary>
<div class="govuk-details__text">
We recommend that you post your evidence instead.
</div>
<div class="govuk-details__text">
To find details on where to post your evidence, you need to contact the benefit that you wish to send evidence to directly.
</div>
</details>

<button type="submit" class="govuk-button" data-module="govuk-button">
Upload and continue
</button>
Expand Down
203 changes: 203 additions & 0 deletions app/views/round-9/e6/upload-table-content-2.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{% extends "layouts/main.html" %}

{% set evidenceTypeCapitalFirstLetter = data.evidenceType %}
{% if data.evidenceType !== "P60" %}
{% set evidenceType = data.evidenceType.toLowerCase() %}
{% else %}
{% set evidenceType = data.evidenceType %}
{% endif %}

{% set remainingUploadBalance = data.uploadLimit - data.benefits[0].files.length * 9 %}

{% set warningText = "You have gone over your 100MB limit. You must remove at least " + remainingUploadBalance * -1 + "MB to continue."%}

{% block pageTitle %}
Content page template – {{ serviceName }} – GOV.UK Prototype Kit
{% endblock %}

{% block beforeContent %}

<div class="govuk-!-padding-bottom-4"></div>

{# {{ data | dump }} #}

{{ govukBackLink({
text: "Back",
href: "javascript:window.history.back()"
}) }}

{% endblock %}

{% block content %}

{% for item in data.benefits %}

<h1 class="govuk-heading-xl">Upload {{ evidenceType }}</h1>

{% if data.benefits[0].files.length > 0 %}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-m">{{ evidenceTypeCapitalFirstLetter }} files added</h2>

<dl class="govuk-summary-list">
{% for item in data.benefits %}
{% if item.name === data.yourBenefits %}
{% for item in item.files %}
<div class="govuk-summary-list__row">

<dt class="govuk-summary-list__key">
File {{ loop.index }}
</dt>
<dd class="govuk-summary-list__value">
<p><a download href="/" class="govuk-link">{{item}}</a> (9MB)</p>
</dd>
<dd class="govuk-summary-list__actions">

<a class="govuk-link" href="/round-9/e6/are-you-sure?file={{ loop.index }}" name="file-to-delete">Remove</a>

</dd>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</dl>
</div>
</div>

{% if remainingUploadBalance > 0 %}

<div class="govuk-inset-text">
You have {{ remainingUploadBalance }}MB remaining of your upload limit
</div>

<div class="govuk-!-padding-bottom-4"></div>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">

<div class="govuk-form-group">

<fieldset class="govuk-fieldset">

<legend class="govuk-fieldset__legend govuk-fieldset__legend--m">

Do you want to upload another {{ evidenceType }} file?

</legend>

<div id="changedName-hint" class="govuk-hint">
For example, if your {{ evidenceType }} has more pages.
</div>

<div class="govuk-radios govuk-radios--inline"data-module="govuk-radios">

<div class="govuk-radios__item">
<input class="govuk-radios__input" id="another-yes" name="another" type="radio" value="true">
<label class="govuk-label govuk-radios__label" for="another-yes">
Yes
</label>

</div>

<div class="govuk-radios__item">
<input class="govuk-radios__input" id="another-no" name="another" type="radio" value="false">
<label class="govuk-label govuk-radios__label" for="another-no">
No
</label>

</div>

</fieldset>

<div class="govuk-!-padding-bottom-6"></div>

<button class="govuk-button" value= "true" data-module="govuk-button" onclick="check()">Continue</button>

</div>

{% else %}
{{ govukWarningText({
text: warningText,
iconFallbackText: "Warning"
}) }}



<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h3 class="govuk-heading-s">How do I send more files?</h3>
<p>You will need to send your files in 2 parts because they are too big to send all together.</p>
<p>Remove some files so you are not over the 100MB limit, then send your files.</p>
<p>Then start the process again to add and send the files you removed.</p>
<p>You can also post your evidence instead. To find details on where to post your evidence, you need to contact the benefit that you wish to send evidence to directly.</p>
</div>
</div>

{% endif %}


{% else %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="govuk-heading-m">No {{ evidenceType }} files added</h2>
<p>You will need to upload a file to send your evidence.</p>
</div>
</div>

<div class="govuk-button-group">
<button class="govuk-button" value= "true" data-module="govuk-button" type="button" onclick="location.href='/round-8/e5/upload-evidence'">Continue to upload</button>
<a class="govuk-link" href="/round-8/e5/abandon-journey">Cancel upload</a>
</div>


{% endif %}

{% endfor %}

<script>
const url = window.location.origin + window.location.pathname;
window.history.replaceState(null, null, url);
function check() {
let yesNoRadio = document.getElementsByName("another");
let hasSelection = false
for (var i = 0; i < yesNoRadio.length; i++) {
if (yesNoRadio[i].checked) {
hasSelection = true;
}
}
if (!hasSelection) {
//window.location.href = "/error/upload-table.njk";
return;
} else {
if (document.getElementById("another-yes").checked) {
window.location.href = "upload-another-page"
} else {
window.location.href = "upload-summary"
}
}
}
{# function removeFile(fileName) {
req.session = {
...req.session,
"selectedFile": fileName
}
window.location.href = "are-you-sure"
}
function test(itemName) {
const dataTest = {{ data | dump }};
// data["fileToDelete"] = itemName;
console.log(dataTest);
window.location.href="/round-8/e5/are-you-sure"
} #}
</script>

</div>
</div>




{% endblock %}
22 changes: 21 additions & 1 deletion app/views/round-9/e6/upload-table.njk
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,36 @@

</fieldset>

<div class="govuk-!-padding-bottom-6"></div>

<button class="govuk-button" value= "true" data-module="govuk-button" onclick="check()">Continue</button>

</div>

{% else %}
{{ govukWarningText({
text: warningText,
iconFallbackText: "Warning"
}) }}



<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h3 class="govuk-heading-s">How do I send more files?</h3>
<p>You will need to send your files in 2 parts if they are too big to send all together. You can send some now, and then start again to send the rest.</p>
<p>Follow these 3 steps:</p>
<ol class="govuk-list govuk-list--number">
<li>Remove some files so you are not over the 100MB limit</li>
<li>Send the files you did not remove</li>
<li>Start the process again to add and send the files you removed</li>
</ol>
<p>You can also post your evidence instead. To find details on where to post your evidence, you need to contact the benefit that you wish to send evidence to directly.</p>
</div>
</div>

{% endif %}

<button class="govuk-button" value= "true" data-module="govuk-button" onclick="check()">Continue</button>

{% else %}
<div class="govuk-grid-row">
Expand Down

0 comments on commit c02ccb1

Please sign in to comment.