Skip to content

Commit

Permalink
Add validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozzey committed Dec 30, 2024
1 parent 7ba7225 commit 978f89c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion app/views/return-logs/edit.njk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'layout.njk' %}
{% from "govuk/components/back-link/macro.njk" import govukBackLink %}
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %}

Expand All @@ -13,6 +14,19 @@
{% endblock %}

{% block content %}
{# Error message #}
{% if error %}
{{ govukErrorSummary({
titleText: "There is a problem",
errorList: [
{
text: error,
href: '#'
}
]
}) }}
{% endif %}

{# Main heading #}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down Expand Up @@ -92,6 +106,7 @@
<input type="hidden" name="wrlsCrumb" value="{{wrlsCrumb}}"/>
{{ govukRadios({
name: "howToEdit",
errorMessage: error,
fieldset: {
legend: {
text: "How would you like to edit this return?",
Expand All @@ -113,7 +128,7 @@
text: "Enter a nil return"
},
{
value: '/return-logs/edit/query?returnLogId=' + returnLogId,
value: 'query',
text: queryText
}
]
Expand Down

0 comments on commit 978f89c

Please sign in to comment.