Skip to content

Commit

Permalink
make sure form is populated with values in the session
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Nov 23, 2023
1 parent d0d88ae commit 92cf271
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/views/data-subject.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
text: "Tree preservation order"
}
],
value: data.check.dataSubject,
value: values['data-subject'],
errorMessage: {
text: errorMessage
} if dataSubjectError else undefined
Expand Down
2 changes: 1 addition & 1 deletion src/views/dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
},
items: options.datasetItems,
value: data.check.dataset,
value: values.dataset,
errorMessage: {
text: errorMessage
} if datasetError else undefined
Expand Down
2 changes: 1 addition & 1 deletion src/views/email-address.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
type: "email",
autocomplete: "email",
spellcheck: false,
value: data.check.emailAddress,
value: values['email-address'],
errorMessage: {
text: 'email-address' | validationMessageLookup(errors['email-address'].type)
} if datasetError else undefined
Expand Down
2 changes: 1 addition & 1 deletion src/views/lpa.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
classes: 'govuk-label--l'
},
type: "text",
value: data.check.lpa,
value: values.lpa,
errorMessage: {
text: 'lpa' | validationMessageLookup(errors['lpa'].type)
} if 'lpa' in errors
Expand Down
4 changes: 2 additions & 2 deletions src/views/name.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h1 class="govuk-heading-l">
hint: {
text: "Or given name"
},
value: data.check.firstName,
value: values['first-name'],
errorMessage: {
text: 'first-name' | validationMessageLookup(errors['first-name'].type)
} if 'first-name' in errors
Expand All @@ -56,7 +56,7 @@ <h1 class="govuk-heading-l">
hint: {
text: "Or family name"
},
value: data.check.lastName,
value: values['last-name'],
errorMessage: {
text: 'last-name' | validationMessageLookup(errors['last-name'].type)
} if 'last-name' in errors
Expand Down
1 change: 1 addition & 0 deletions src/views/upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
hint: {
text: "You can upload a CSV, GeoJSON, GML or Geopackage file"
},
value: values.datafile,
errorMessage: {
text: errorMessage
} if datasetError else undefined
Expand Down

0 comments on commit 92cf271

Please sign in to comment.