Skip to content

Commit

Permalink
verification screens
Browse files Browse the repository at this point in the history
  • Loading branch information
DavDohDWP committed Jan 8, 2025
1 parent 2385a4f commit 8978ad9
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 8 deletions.
178 changes: 178 additions & 0 deletions app/views/evidence/upload-table-new-idea.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{% 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">Check your files</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="/evidence/are-you-sure?file={{ loop.index }}" name="file-to-delete">Remove</a>

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

{% if remainingUploadBalance > 0 %}

<p>
You have {{ remainingUploadBalance }}MB remaining of your upload limit.
</p>

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

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

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

<div class="govuk-button-group">
<button class="govuk-button" value= "true" data-module="govuk-button" onclick="check()">Continue</button>
<button type="submit" class="govuk-button govuk-button--secondary" data-module="govuk-button">
Add another file
</button>
</div>

</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 %}


{% 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='/evidence/upload-evidence'">Continue to upload</button>
<a class="govuk-link" href="/evidence/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="/evidence/are-you-sure"
} #}
</script>

</div>
</div>




{% endblock %}
3 changes: 2 additions & 1 deletion app/views/preferences/customer-view/verify/email-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ <h2 class="govuk-heading-m">Email content</h2>
<div class="govuk-!-padding-bottom-2"></div>

<p class="govuk-body">Hi [name],</p>
<p class="govuk-body">Here is your 6 digit code. Enter it on the 'Verify your email' screen to continue.</p>
<p class="govuk-body">You recently updated how we contact you. You should now verify your email with us.</p>
<p class="govuk-body">To do this, you will need to enter the 6 digit code below on our <a href="#" class="govuk-link">verification page</a>. You may need to login to our One Login service before being able to enter your code.</p>
<p class="govuk-body"><b>123456</b></p>
<p class="govuk-body">Department for Work and Pensions (DWP)</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 class="govuk-notification-banner__heading">

<h2 class="govuk-heading-m">What happens next</h2>
<p class="govuk-body">We have sent you a confirmation email to example@email.com.</p>
<p class="govuk-body">You can now <a href="#" class="govuk-link">exit this page</a>.</p>
<p class="govuk-body">You can now leave this page.</p>
</div>
</div>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 class="govuk-notification-banner__heading">

<h2 class="govuk-heading-m">What happens next</h2>
<p class="govuk-body">We have sent you a confirmation text message to 07123 456 789.</p>
<p class="govuk-body">You can now <a href="#" class="govuk-link">exit this page</a>.</p>
<p class="govuk-body">You can now leave this page.</p>
</div>
</div>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ <h2 class="govuk-heading-m">Text message content</h2>
<div class="govuk-!-padding-bottom-2"></div>

<p class="govuk-body">Hi [name],</p>
<p class="govuk-body">Here is your 6 digit code. Enter it on the 'Verify your phone number' screen to continue.</p>
<p class="govuk-body">You recently updated how we contact you. You should now verify your phone number with us.</p>
<p class="govuk-body">To do this, you will need to enter the 6 digit code below on our <a href="#" class="govuk-link">verification page</a>. You may need to login to our One Login service before being able to enter your code.</p>
<p class="govuk-body"><b>123456</b></p>
<p class="govuk-body">Department for Work and Pensions (DWP)</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ <h1 class="govuk-heading-l">Verify your email</h1>
<input class="govuk-input govuk-input--width-4 govuk-input--extra-letter-spacing" id="security-code" name="securityCode" type="text" autocomplete="one-time-code" inputmode="numeric">
</div>

<p><a href="resend-code">Resend email</a></p>
<p><a href="resend-code">I did not get an email</a></p>
<p><a href="resend-code">Resend code</a></p>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ <h1 class="govuk-heading-l">Verify your phone number</h1>
<input class="govuk-input govuk-input--width-4 govuk-input--extra-letter-spacing" id="security-code" name="securityCode" type="text" autocomplete="one-time-code" inputmode="numeric">
</div>

<p><a href="resend-code">Resend text message</a></p>
<p><a href="resend-code">I did not get a text message</a></p>
<p><a href="resend-code">Resend code</a></p>

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

Expand Down

0 comments on commit 8978ad9

Please sign in to comment.