diff --git a/.nvmrc b/.nvmrc
index 9de2256..deed13c 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-lts/iron
+lts/jod
diff --git a/digitalmarketplace_frontend_jinja/templates/components/question-list-multiquestion/macro.html b/digitalmarketplace_frontend_jinja/templates/components/question-list-multiquestion/macro.html
new file mode 100644
index 0000000..5cd48f0
--- /dev/null
+++ b/digitalmarketplace_frontend_jinja/templates/components/question-list-multiquestion/macro.html
@@ -0,0 +1,79 @@
+{% macro digitalmarketplaceQuestionListMultiquestion(params) %}
+{%- from "govuk_frontend_jinja/components/fieldset/macro.html" import govukFieldset -%}
+{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
+{%- from "digitalmarketplace_frontend_jinja/components/question/macro.html" import digitalmarketplaceQuestion -%}
+
+{% if params.question.questions -%}
+ {% call govukFieldset({
+ "legend": {
+ "text": params.question.question,
+ "classes": 'govuk-fieldset__legend--m'
+ },
+ "attributes": {
+ 'data-module': "dm-question-list-multiquestion",
+ 'data-max-number-of-items': params.max_number_of_items
+ }
+ }) %}
+ {% if params.question.question_advice %}
+
+ {{ params.question.question_advice | safe }}
+
+ {% endif %}
+
+
+ {% for multi_question in params.question.questions %}
+ {% if multi_question.questions -%}
+
+ {% call govukFieldset({
+ "legend": {
+ "text": multi_question.question,
+ "classes": 'govuk-fieldset__legend--m'
+ }
+ }) %}
+ {% if multi_question.question_advice %}
+
+ {{ multi_question.question_advice | safe }}
+
+ {% endif %}
+
+
+ {% for question in multi_question.questions %}
+
+ {{ digitalmarketplaceQuestion({
+ "type": question.type,
+ "question": question,
+ "data": params.data,
+ "errors": params.errors,
+ "frameworkReusedFrom": params.frameworkReusedFrom
+ }) }}
+
+ {% endfor %}
+
+ {% endcall %}
+
+ {%- endif %}
+ {% endfor %}
+
+
+
+
+ {{ govukButton({
+ "html": 'Remove item 0',
+ "classes": 'govuk-button--secondary dm-list-multiquestion__item-remove govuk-visually-hidden',
+ "type": 'button'
+ })}}
+
+
+
+
+
+ {{ govukButton({
+ "html": 'Add item (0 remaining)',
+ "classes": 'govuk-button--secondary dm-list-multiquestion__item-add govuk-visually-hidden',
+ "type": 'button'
+ })}}
+
+
+ {% endcall %}
+{%- endif %}
+{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/question/macro.html b/digitalmarketplace_frontend_jinja/templates/components/question/macro.html
index d69443f..ec6728b 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/question/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/question/macro.html
@@ -12,6 +12,7 @@
{%- from "digitalmarketplace_frontend_jinja/components/question-list/macro.html" import digitalmarketplaceQuestionList -%}
{%- from "digitalmarketplace_frontend_jinja/components/question-select/macro.html" import digitalmarketplaceQuestionSelect -%}
{%- from "digitalmarketplace_frontend_jinja/components/question-multiquestion/macro.html" import digitalmarketplaceQuestionMultiquestion -%}
+{%- from "digitalmarketplace_frontend_jinja/components/question-list-multiquestion/macro.html" import digitalmarketplaceQuestionListMultiquestion -%}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/boolean/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-boolean/macro.html
similarity index 73%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/boolean/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-boolean/macro.html
index 164d3f7..f5841c2 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/boolean/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-boolean/macro.html
@@ -1,17 +1,17 @@
{% macro digitalmarketplaceSummaryContentBoolean(params) %}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/text/macro.html" import digitalmarketplaceSummaryContentText -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-text/macro.html" import digitalmarketplaceSummaryContentText -%}
{% if params.value == true %}
{{ digitalmarketplaceSummaryContentText({
- "text": "Yes"
+ "value": "Yes"
}) }}
{% elif params.value == false %}
{{ digitalmarketplaceSummaryContentText({
- "text": "No"
+ "value": "No"
}) }}
{% else %}
{{ digitalmarketplaceSummaryContentText({
- "text": params.value
+ "value": params.value
}) }}
{% endif %}
{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/checkbox-tree/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-checkbox-tree/macro.html
similarity index 100%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/checkbox-tree/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-checkbox-tree/macro.html
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content-list-multiquestion/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-list-multiquestion/macro.html
new file mode 100644
index 0000000..902cf37
--- /dev/null
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-list-multiquestion/macro.html
@@ -0,0 +1,16 @@
+{% macro digitalmarketplaceSummaryContentListMultiquestion(params) %}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-multiquestion/macro.html" import digitalmarketplaceSummaryContentMultiquestion -%}
+
+{% if params.value -%}
+
+ {% for multi_question in params.value %}
+
+
{{ multi_question.name }}
+ {{ digitalmarketplaceSummaryContentMultiquestion({
+ "value": multi_question.value
+ }) }}
+
+ {% endfor %}
+
+{%- endif %}
+{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content-list/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-list/macro.html
new file mode 100644
index 0000000..f50b56b
--- /dev/null
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-list/macro.html
@@ -0,0 +1,19 @@
+{% macro digitalmarketplaceSummaryContentList(params) %}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-text/macro.html" import digitalmarketplaceSummaryContentText -%}
+
+{% if params.value | length == 0 %}
+ {{ digitalmarketplaceSummaryContentText({
+ "value": ''
+ }) }}
+{% elif params.value | length == 1 %}
+ {{ digitalmarketplaceSummaryContentText({
+ "value": params.value[0]
+ }) }}
+{% elif params.value | length > 1 %}
+
+ {% for item in params.value %}
+ - {{ item }}
+ {% endfor %}
+
+{% endif %}
+{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/multiquestion/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-multiquestion/macro.html
similarity index 100%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/multiquestion/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-multiquestion/macro.html
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/number/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-number/macro.html
similarity index 72%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/number/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-number/macro.html
index 12dd194..7e6f067 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/number/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-number/macro.html
@@ -1,13 +1,13 @@
{% macro digitalmarketplaceSummaryContentNumber(params) %}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/text/macro.html" import digitalmarketplaceSummaryContentText -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-text/macro.html" import digitalmarketplaceSummaryContentText -%}
{% if params.value or params.value == 0 %}
{{ digitalmarketplaceSummaryContentText({
- "text": params.value
+ "value": params.value
}) }}
{% else %}
{{ digitalmarketplaceSummaryContentText({
- "text": ""
+ "value": ""
}) }}
{% endif %}
{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/radios/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-radios/macro.html
similarity index 63%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/radios/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-radios/macro.html
index 61fa501..c059e16 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/radios/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-radios/macro.html
@@ -1,14 +1,14 @@
{% macro digitalmarketplaceSummaryContentRadios(params) %}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/text/macro.html" import digitalmarketplaceSummaryContentText -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/list/macro.html" import digitalmarketplaceSummaryContentList -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-text/macro.html" import digitalmarketplaceSummaryContentText -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-list/macro.html" import digitalmarketplaceSummaryContentList -%}
{% if params.value is string %}
{{ digitalmarketplaceSummaryContentText({
- "text": params.value
+ "value": params.value
}) }}
{% else %}
{{ digitalmarketplaceSummaryContentList({
- "items": params.value
+ "value": params.value
}) }}
{% endif %}
{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/service-id/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-service-id/macro.html
similarity index 100%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/service-id/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-service-id/macro.html
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/text/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-text/macro.html
similarity index 82%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/text/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-text/macro.html
index 0d4360a..612da3e 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/text/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content-text/macro.html
@@ -1,5 +1,5 @@
{% macro digitalmarketplaceSummaryContentText(params) %}
- {{ params.text }}
+ {{ params.value }}
{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/upload/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content-upload/macro.html
similarity index 100%
rename from digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/upload/macro.html
rename to digitalmarketplace_frontend_jinja/templates/components/summary-content-upload/macro.html
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html
index d960c4d..2d0f950 100644
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html
+++ b/digitalmarketplace_frontend_jinja/templates/components/summary-content/macro.html
@@ -1,23 +1,24 @@
{% macro digitalmarketplaceSummaryContent(params) %}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/text/macro.html" import digitalmarketplaceSummaryContentText -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/list/macro.html" import digitalmarketplaceSummaryContentList -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/upload/macro.html" import digitalmarketplaceSummaryContentUpload -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/service-id/macro.html" import digitalmarketplaceSummaryContentServiceId -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/radios/macro.html" import digitalmarketplaceSummaryContentRadios -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/boolean/macro.html" import digitalmarketplaceSummaryContentBoolean -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/number/macro.html" import digitalmarketplaceSummaryContentNumber -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/checkbox-tree/macro.html" import digitalmarketplaceSummaryContentCheckboxTree -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/multiquestion/macro.html" import digitalmarketplaceSummaryContentMultiquestion -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-text/macro.html" import digitalmarketplaceSummaryContentText -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-list/macro.html" import digitalmarketplaceSummaryContentList -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-upload/macro.html" import digitalmarketplaceSummaryContentUpload -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-service-id/macro.html" import digitalmarketplaceSummaryContentServiceId -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-radios/macro.html" import digitalmarketplaceSummaryContentRadios -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-boolean/macro.html" import digitalmarketplaceSummaryContentBoolean -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-number/macro.html" import digitalmarketplaceSummaryContentNumber -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-checkbox-tree/macro.html" import digitalmarketplaceSummaryContentCheckboxTree -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-multiquestion/macro.html" import digitalmarketplaceSummaryContentMultiquestion -%}
+{%- from "digitalmarketplace_frontend_jinja/components/summary-content-list-multiquestion/macro.html" import digitalmarketplaceSummaryContentListMultiquestion -%}
{% set textOptions = ['text', 'text_bold', 'textbox', 'textbox_large', 'pricing', 'date'] %}
{% if params.type in textOptions %}
{{ digitalmarketplaceSummaryContentText({
- "text": params.value
+ "value": params.value
}) }}
{% elif params.type == 'list' or params.type == 'checkboxes'%}
{{ digitalmarketplaceSummaryContentList({
- "items": params.value
+ "value": params.value
}) }}
{% elif params.type == 'upload' %}
{{ digitalmarketplaceSummaryContentUpload({
@@ -47,5 +48,9 @@
{{ digitalmarketplaceSummaryContentMultiquestion({
'value': params.value
}) }}
+{% elif params.type == 'list_multiquestion' %}
+ {{ digitalmarketplaceSummaryContentListMultiquestion({
+ 'value': params.value
+ }) }}
{% endif %}
{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list-items/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list-items/macro.html
deleted file mode 100644
index aec2069..0000000
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list-items/macro.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% macro digitalmarketplaceSummaryContentListItems(params) %}
-
- {% for item in params['items'] %}
- - {{ item }}
- {% endfor %}
-
-{% endmacro %}
diff --git a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list/macro.html b/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list/macro.html
deleted file mode 100644
index f152b9b..0000000
--- a/digitalmarketplace_frontend_jinja/templates/components/summary-content/macros/list/macro.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{% macro digitalmarketplaceSummaryContentList(params) %}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/text/macro.html" import digitalmarketplaceSummaryContentText -%}
-{%- from "digitalmarketplace_frontend_jinja/components/summary-content/macros/list-items/macro.html" import digitalmarketplaceSummaryContentListItems -%}
-
-{% if params['items'] | length == 0 %}
- {{ digitalmarketplaceSummaryContentText({
- "text": ''
- }) }}
-{% elif params['items'] | length == 1 %}
- {{ digitalmarketplaceSummaryContentText({
- "text": params['items'][0]
- }) }}
-{% elif params['items'] | length > 1 %}
- {{ digitalmarketplaceSummaryContentListItems(params) }}
-{% endif %}
-{% endmacro %}
diff --git a/package-lock.json b/package-lock.json
index af30372..d395e5f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "0.0.0",
"license": "MIT",
"devDependencies": {
- "digitalmarketplace-frontend": "^1.3.1"
+ "digitalmarketplace-frontend": "^2.0.0-beta.0"
}
},
"node_modules/accessible-autocomplete": {
@@ -28,9 +28,9 @@
}
},
"node_modules/digitalmarketplace-frontend": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/digitalmarketplace-frontend/-/digitalmarketplace-frontend-1.3.1.tgz",
- "integrity": "sha512-2uS2+VBQM1BApWIoXJxRleejYgf8JJqasg91nfr4+0baWv/C949a2vuQ1dXMRYy0hyDo5+HoS0SEWVr8Kx02og==",
+ "version": "2.0.0-beta.0",
+ "resolved": "https://registry.npmjs.org/digitalmarketplace-frontend/-/digitalmarketplace-frontend-2.0.0-beta.0.tgz",
+ "integrity": "sha512-ezeLrf3yCgfcNdqszNkZxmuBHWm1zsMpHKtn2jI7i6S2zWtlxXWQKGtasq4x0qmWxko+UXWvEJ5udDRLZINh+g==",
"dev": true,
"license": "MIT",
"engines": {
diff --git a/package.json b/package.json
index 89e05bf..6634d3a 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,6 @@
"author": "CCS",
"license": "MIT",
"devDependencies": {
- "digitalmarketplace-frontend": "^1.3.1"
+ "digitalmarketplace-frontend": "^2.0.0-beta.0"
}
}