metadata_presenter 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/metadata_presenter/page/exit.html.erb +29 -0
- data/config/initializers/supported_components.rb +4 -0
- data/default_metadata/page/exit.json +9 -0
- data/fixtures/branching_7.json +9 -17
- data/lib/metadata_presenter/version.rb +1 -1
- data/schemas/page/exit.json +25 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e206021a09261b7ed5628f794767a935f94c89315a9a2da0771e0e8b0a3f7d10
|
4
|
+
data.tar.gz: 82fdc1a08806381b692198e17f1d9e600d876a8ee1313947738ffbfb9585c2c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cd644e56226d865e3f1d903e06b0b82bb606bb981f6b32510670a5d2ae5e262e890c9ff5d65e77796c07715e184b4fb772e2a3cd4a648c851c558d6aa12eea9
|
7
|
+
data.tar.gz: 75524d74b558b8f64b9cd31f3c2125ba94df8744e6ca7afa9ab49f0c499f29c91bbe2428c81f61f12e35c3156539b122f921637280b8a97d84bb8afff7f615dd
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div class="fb-main-grid-wrapper" data-fb-pagetype="<%= @page.type %>">
|
2
|
+
<div class="govuk-grid-row">
|
3
|
+
<div class="govuk-grid-column-two-thirds">
|
4
|
+
|
5
|
+
<%= render 'metadata_presenter/attribute/section_heading' %>
|
6
|
+
|
7
|
+
<h1 class="fb-editable govuk-heading-xl"
|
8
|
+
data-fb-content-id="page[heading]"
|
9
|
+
data-fb-content-type="element">
|
10
|
+
<%= @page.heading %>
|
11
|
+
</h1>
|
12
|
+
|
13
|
+
<%= render 'metadata_presenter/attribute/lede' %>
|
14
|
+
|
15
|
+
<%= form_for @page_answers, as: :answers, url: @page.url, method: :post do |f| %>
|
16
|
+
|
17
|
+
<%= render partial: 'metadata_presenter/component/components',
|
18
|
+
locals: {
|
19
|
+
f: f,
|
20
|
+
components: @page.components,
|
21
|
+
tag: nil,
|
22
|
+
classes: nil,
|
23
|
+
input_components: @page.supported_input_components,
|
24
|
+
content_components: @page.supported_content_components
|
25
|
+
} %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
@@ -12,6 +12,10 @@ Rails.application.config.supported_components =
|
|
12
12
|
input: %w(),
|
13
13
|
content: %w(content)
|
14
14
|
},
|
15
|
+
exit: {
|
16
|
+
input: %w(),
|
17
|
+
content: %w(content)
|
18
|
+
},
|
15
19
|
multiplequestions: {
|
16
20
|
input: %w(text textarea number date radios checkboxes),
|
17
21
|
content: %w(content)
|
data/fixtures/branching_7.json
CHANGED
@@ -329,28 +329,20 @@
|
|
329
329
|
{
|
330
330
|
"_id": "page.g",
|
331
331
|
"url": "page-g",
|
332
|
-
"
|
333
|
-
"
|
334
|
-
"_type": "page.singlequestion",
|
332
|
+
"lede": "lede",
|
333
|
+
"_type": "page.exit",
|
335
334
|
"_uuid": "3a584d15-6805-4a21-bc05-b61c3be47857",
|
336
335
|
"heading": "Page G",
|
337
336
|
"components": [
|
338
337
|
{
|
339
|
-
"_id": "
|
340
|
-
"
|
341
|
-
"
|
342
|
-
"
|
343
|
-
"
|
344
|
-
"label": "Page G",
|
345
|
-
"errors": {},
|
346
|
-
"collection": "components",
|
347
|
-
"validation": {
|
348
|
-
"required": true,
|
349
|
-
"max_length": 20,
|
350
|
-
"min_length": 2
|
351
|
-
}
|
338
|
+
"_id": "exit_content_1",
|
339
|
+
"name": "exit_content_1",
|
340
|
+
"_type": "content",
|
341
|
+
"_uuid": "9774d986-135a-4b7f-924d-7527b790e1a0",
|
342
|
+
"content": "This is an exit page"
|
352
343
|
}
|
353
|
-
]
|
344
|
+
],
|
345
|
+
"section_heading": "Section heading"
|
354
346
|
},
|
355
347
|
{
|
356
348
|
"_id": "page.h",
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{
|
2
|
+
"$id": "http://gov.uk/schema/v1.0.0/page/exit",
|
3
|
+
"_name": "page.exit",
|
4
|
+
"title": "Exit",
|
5
|
+
"description": "Display an exit page to users when they cannot proceed",
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"_type": {
|
9
|
+
"const": "page.exit"
|
10
|
+
},
|
11
|
+
"components": {
|
12
|
+
"title": "Content",
|
13
|
+
"description": "The form or content elements used on the page",
|
14
|
+
"type": "array",
|
15
|
+
"items": {
|
16
|
+
"$ref": "component.content"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"allOf": [
|
21
|
+
{
|
22
|
+
"$ref": "definition.page.content"
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metadata_presenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MoJ Forms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_design_system_formbuilder
|
@@ -337,6 +337,7 @@ files:
|
|
337
337
|
- app/views/metadata_presenter/page/checkanswers.html.erb
|
338
338
|
- app/views/metadata_presenter/page/confirmation.html.erb
|
339
339
|
- app/views/metadata_presenter/page/content.html.erb
|
340
|
+
- app/views/metadata_presenter/page/exit.html.erb
|
340
341
|
- app/views/metadata_presenter/page/form.html.erb
|
341
342
|
- app/views/metadata_presenter/page/multiplequestions.html.erb
|
342
343
|
- app/views/metadata_presenter/page/singlequestion.html.erb
|
@@ -367,6 +368,7 @@ files:
|
|
367
368
|
- default_metadata/page/checkanswers.json
|
368
369
|
- default_metadata/page/confirmation.json
|
369
370
|
- default_metadata/page/content.json
|
371
|
+
- default_metadata/page/exit.json
|
370
372
|
- default_metadata/page/multiplequestions.json
|
371
373
|
- default_metadata/page/singlequestion.json
|
372
374
|
- default_metadata/page/standalone.json
|
@@ -460,6 +462,7 @@ files:
|
|
460
462
|
- schemas/page/checkanswers.json
|
461
463
|
- schemas/page/confirmation.json
|
462
464
|
- schemas/page/content.json
|
465
|
+
- schemas/page/exit.json
|
463
466
|
- schemas/page/multiplequestions.json
|
464
467
|
- schemas/page/singlequestion.json
|
465
468
|
- schemas/page/standalone.json
|