Skip to content

Commit

Permalink
Merge pull request #35 from Crown-Commercial-Service/dependabot/npm_a…
Browse files Browse the repository at this point in the history
…nd_yarn/ccs-digitalmarketplace-govuk-frontend-5.4.3

Bump ccs-digitalmarketplace-govuk-frontend from 5.4.2 to 5.4.3
  • Loading branch information
tim-s-ccs authored Apr 8, 2024
2 parents f6d3dab + 55dd63f commit 1e70f41
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The following table shows the version of Digital Marketplace Frontend Jinja that

| Digital Marketplace Frontend Jinja Version | Target CCS Digital Marketplace GOV.UK Frontend Version |
| ----------------------------- | ------------------------------ |
| [1.3.3](https:/tim-s-ccs/ccs-digitalmarketplace-frontend-jinja/releases/tag/1.3.3) | [5.4.3](https:/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/5.4.3) |
| [1.3.2](https:/tim-s-ccs/ccs-digitalmarketplace-frontend-jinja/releases/tag/1.3.2) | [5.4.2](https:/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/5.4.2) |
| [1.3.1](https:/tim-s-ccs/ccs-digitalmarketplace-frontend-jinja/releases/tag/1.3.1) | [5.4.1](https:/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/5.4.1) |
| [1.3.0](https:/tim-s-ccs/ccs-digitalmarketplace-frontend-jinja/releases/tag/1.3.0) | [5.4.0](https:/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/5.4.0) |
Expand Down
2 changes: 1 addition & 1 deletion digitalmarketplace_frontend_jinja/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.3.2'
__version__ = '1.3.3'
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@
{% set values = params.form.data or []%}

{% if 'items' not in params %}
{% for item in params.form.options %}
{% set _ = item.__setitem__("text", item["label"]) %}
{% for option in params.form.options %}
{% set item = {
"value": option["value"],
"text": option["label"]
} %}

{% if item["value"] in values %}
{% if option["value"] in values %}
{% set _ = item.__setitem__("checked", true) %}
{% endif %}

{% if "description" in item %}
{% set _ = item.__setitem__("hint", { 'text': item["description"] }) %}
{% if "description" in option %}
{% set _ = item.__setitem__("hint", { 'text': option["description"] }) %}
{% endif %}

{% for attribute in ["id", "divider", "conditional", "behaviour", "disabled", "attributes"] %}
{% set _ = item.__setitem__(attribute, option[attribute]) if attribute in option %}
{% endfor %}

{% set _ = items.append(item) %}
{% endfor %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@


{% if 'items' not in params %}
{% for item in params.form.options %}
{% set _ = item.__setitem__("text", item["label"]) %}
{% for option in params.form.options %}
{% set item = {
"value": option["value"],
"text": option["label"]
} %}

{% if params.form.data == item["value"] %}
{% if params.form.data == option["value"] %}
{% set _ = item.__setitem__("checked", true) %}
{% endif %}

{% if "description" in item %}
{% set _ = item.__setitem__("hint", { 'text': item["description"] }) %}
{% if "description" in option %}
{% set _ = item.__setitem__("hint", { 'text': option["description"] }) %}
{% endif %}

{% for attribute in ["id", "divider", "conditional", "disabled", "attributes"] %}
{% set _ = item.__setitem__(attribute, option[attribute]) if attribute in option %}
{% endfor %}

{% set _ = items.append(item) %}
{% endfor %}

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"author": "CCS",
"license": "MIT",
"devDependencies": {
"ccs-digitalmarketplace-govuk-frontend": "^5.4.2"
"ccs-digitalmarketplace-govuk-frontend": "^5.4.3"
}
}

0 comments on commit 1e70f41

Please sign in to comment.