Skip to content

Commit ce7bb1f

Browse files
Add geospatial pattern link (#1379)
* Add Geospatial component lede info text on the question details page * Remove route scope from submission map review page * Add missing closing bracket * Update geospatial map placeholder * Update geospatial map placeholder * Bump engine to v4.5.6
1 parent 0715151 commit ce7bb1f

File tree

5 files changed

+4085
-3813
lines changed

5 files changed

+4085
-3813
lines changed
-30.9 KB
Loading

designer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@babel/plugin-syntax-import-attributes": "^7.25.6",
3737
"@babel/preset-react": "^7.26.3",
3838
"@dagrejs/dagre": "^1.1.5",
39-
"@defra/forms-engine-plugin": "^4.5.5",
39+
"@defra/forms-engine-plugin": "^4.5.6",
4040
"@defra/forms-model": "^3.0.643",
4141
"@defra/hapi-tracing": "^1.28.0",
4242
"@elastic/ecs-pino-format": "^1.5.0",

designer/server/src/routes/submission/submission.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Scopes, getPageFromDefinition, hasRepeater } from '@defra/forms-model'
1+
import { getPageFromDefinition, hasRepeater } from '@defra/forms-model'
22
import Boom from '@hapi/boom'
33
import Joi from 'joi'
44

@@ -68,10 +68,9 @@ export default [
6868
},
6969
options: {
7070
auth: {
71-
mode: 'required',
7271
access: {
7372
entity: 'user',
74-
scope: [`+${Scopes.FormRead}`]
73+
scope: false
7574
}
7675
},
7776
validate: {

designer/server/src/views/forms/editor-v2/partials/question-details-left-panel.njk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
}) %}
1616
<form class="form" method="post" id="question-form">
1717

18+
{% if questionType == 'GeospatialField' %}
19+
<h3 class="govuk-heading-m">Using maps in your form</h3>
20+
<p class="govuk-body">
21+
We recommend using the <a class="govuk-link govuk-link--no-visited-state" target="_blank" href="https://forms.defra.gov.uk/library/geospatial-pattern">map question pattern (opens in a new tab)</a> when asking users to select or draw locations on a map.
22+
</p>
23+
<p class="govuk-body">
24+
This pattern provides alternatives so users who cannot use maps are not excluded.
25+
</p>
26+
{% endif %}
27+
1828
{%- include "../../../../views/forms/editor-v2/partials/question-details-base.njk" -%}
1929

2030
<hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible">

0 commit comments

Comments
 (0)