-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from Crown-Commercial-Service/make-updates-fo…
…r-dmp-frontend-v2 Update DMP Frontend to v2.0.0-beta.0 and update the node version
- Loading branch information
Showing
18 changed files
with
151 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
lts/iron | ||
lts/jod |
79 changes: 79 additions & 0 deletions
79
...talmarketplace_frontend_jinja/templates/components/question-list-multiquestion/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} | ||
<div class="govuk-body"> | ||
{{ params.question.question_advice | safe }} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="dm-list-multiquestion__items"> | ||
{% for multi_question in params.question.questions %} | ||
{% if multi_question.questions -%} | ||
<div class="dm-list-multiquestion__item"> | ||
{% call govukFieldset({ | ||
"legend": { | ||
"text": multi_question.question, | ||
"classes": 'govuk-fieldset__legend--m' | ||
} | ||
}) %} | ||
{% if multi_question.question_advice %} | ||
<div class="govuk-body"> | ||
{{ multi_question.question_advice | safe }} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="govuk-grid-row"> | ||
{% for question in multi_question.questions %} | ||
<div class="dm-multiquestion__item-input-column govuk-grid-column-{{ params.question.column_width | default('one-half') }}"> | ||
{{ digitalmarketplaceQuestion({ | ||
"type": question.type, | ||
"question": question, | ||
"data": params.data, | ||
"errors": params.errors, | ||
"frameworkReusedFrom": params.frameworkReusedFrom | ||
}) }} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endcall %} | ||
</div> | ||
{%- endif %} | ||
{% endfor %} | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
{{ govukButton({ | ||
"html": 'Remove item <span class="govuk-visually-hidden"><span class="dm-list-multiquestion__item-remove-counter">0</span></span>', | ||
"classes": 'govuk-button--secondary dm-list-multiquestion__item-remove govuk-visually-hidden', | ||
"type": 'button' | ||
})}} | ||
</div> | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
{{ govukButton({ | ||
"html": 'Add item (<span class="dm-list-multiquestion__item-add-counter">0</span> remaining)', | ||
"classes": 'govuk-button--secondary dm-list-multiquestion__item-add govuk-visually-hidden', | ||
"type": 'button' | ||
})}} | ||
</div> | ||
</div> | ||
{% endcall %} | ||
{%- endif %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...summary-content/macros/boolean/macro.html → ...onents/summary-content-boolean/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
...etplace_frontend_jinja/templates/components/summary-content-list-multiquestion/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% macro digitalmarketplaceSummaryContentListMultiquestion(params) %} | ||
{%- from "digitalmarketplace_frontend_jinja/components/summary-content-multiquestion/macro.html" import digitalmarketplaceSummaryContentMultiquestion -%} | ||
|
||
{% if params.value -%} | ||
<div class="list-multiquestion govuk-body-s"> | ||
{% for multi_question in params.value %} | ||
<div class="list-multiquestion__item govuk-body-s"> | ||
<p class="govuk-body govuk-!-margin-bottom-2">{{ multi_question.name }}</p> | ||
{{ digitalmarketplaceSummaryContentMultiquestion({ | ||
"value": multi_question.value | ||
}) }} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{%- endif %} | ||
{% endmacro %} |
19 changes: 19 additions & 0 deletions
19
digitalmarketplace_frontend_jinja/templates/components/summary-content-list/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} | ||
<ul class="govuk-list govuk-list--bullet govuk-body-s"> | ||
{% for item in params.value %} | ||
<li>{{ item }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% endmacro %} |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
.../summary-content/macros/number/macro.html → ...ponents/summary-content-number/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
8 changes: 4 additions & 4 deletions
8
.../summary-content/macros/radios/macro.html → ...ponents/summary-content-radios/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ts/summary-content/macros/text/macro.html → ...omponents/summary-content-text/macro.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{% macro digitalmarketplaceSummaryContentText(params) %} | ||
<p class="govuk-body-s"> | ||
{{ params.text }} | ||
{{ params.value }} | ||
</p> | ||
{% endmacro %} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...ketplace_frontend_jinja/templates/components/summary-content/macros/list-items/macro.html
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
...talmarketplace_frontend_jinja/templates/components/summary-content/macros/list/macro.html
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters