ccs-digitalmarketplace-frontend-jinja 4.6.0__py3-none-any.whl → 4.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ccs-digitalmarketplace-frontend-jinja
3
- Version: 4.6.0
3
+ Version: 4.7.0
4
4
  Summary: Jinja templates for Digital Marketplace apps.
5
5
  Author: CCS Developers
6
6
  Project-URL: Homepage, https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja
@@ -41,6 +41,7 @@ The following table shows the version of Digital Marketplace Frontend Jinja that
41
41
 
42
42
  | Digital Marketplace Frontend Jinja Version | Target CCS Digital Marketplace GOV.UK Frontend Version |
43
43
  | ------------------------------------------ | ------------------------------------------------------ |
44
+ | [4.7.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.7.0) | [3.7.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.7.0) |
44
45
  | [4.6.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.6.0) | [3.6.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.6.0) |
45
46
  | [4.5.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.5.0) | [3.5.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.5.0) |
46
47
  | [4.4.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-frontend-jinja/releases/tag/4.4.0) | [3.4.0](https://github.com/Crown-Commercial-Service/ccs-digitalmarketplace-govuk-frontend/releases/tag/v3.4.0) |
@@ -1,5 +1,5 @@
1
- ccs_digitalmarketplace_frontend_jinja-4.6.0.dist-info/licenses/LICENCE,sha256=GbPuM26UomDfs5sMy6udIVXYC8grPSN7bSkO29-F5hI,1110
2
- digitalmarketplace_frontend_jinja/__init__.py,sha256=ZR4ZFfJw0RdvcztkKaNry8C740KFt1MZ0k_aZc63zjo,22
1
+ ccs_digitalmarketplace_frontend_jinja-4.7.0.dist-info/licenses/LICENCE,sha256=GbPuM26UomDfs5sMy6udIVXYC8grPSN7bSkO29-F5hI,1110
2
+ digitalmarketplace_frontend_jinja/__init__.py,sha256=G32d2UVGXzvKEmNGcFTp413PKWdKFkcjXSvx3r2dSeQ,22
3
3
  digitalmarketplace_frontend_jinja/templates/components/alert/macro.html,sha256=W4hQmVTEOTSON6ypLoV3cJNgBcCYN1akxy-Y1QZH8X0,992
4
4
  digitalmarketplace_frontend_jinja/templates/components/attachment/macro.html,sha256=0Fi8QqqwmPpZ3UBOjCDiUkfSOYxMYyTlBngnPJrZ7Zo,6452
5
5
  digitalmarketplace_frontend_jinja/templates/components/banner/macro.html,sha256=AsPQydTvw-SwcgczVZmbdlGMXT0SoilvhAtKrTskpME,905
@@ -19,7 +19,7 @@ digitalmarketplace_frontend_jinja/templates/components/previous-next-pagination/
19
19
  digitalmarketplace_frontend_jinja/templates/components/question/macro.html,sha256=lj0D5OopaFalkNG7_wRGHahHg7dbc7ddnMb_K7uv6QM,3722
20
20
  digitalmarketplace_frontend_jinja/templates/components/question-boolean/macro.html,sha256=DVxnbPGYfEa_FgYwLPccvYmS2wD-PC_GI1B_fkYGHho,2878
21
21
  digitalmarketplace_frontend_jinja/templates/components/question-character-count/macro.html,sha256=YMOJiATKyLByuPq8SuPsjN4WZfpSp5PIPtKks1lGnT8,1501
22
- digitalmarketplace_frontend_jinja/templates/components/question-checkbox-tree/macro.html,sha256=0hMnmpSlsfAKJuvskVw2Prq2fdyRJ2DxADduDzKLwJQ,3737
22
+ digitalmarketplace_frontend_jinja/templates/components/question-checkbox-tree/macro.html,sha256=-nSYoI7rmStap6rp_0QIfcYVhs8EjyLW4r1Y0UsDF7A,4593
23
23
  digitalmarketplace_frontend_jinja/templates/components/question-checkboxes/macro.html,sha256=LZzaZVJ8o1nkUBX4Lf_fjIoDeuxwpXnfJcYaOFYQUXY,2496
24
24
  digitalmarketplace_frontend_jinja/templates/components/question-date/macro.html,sha256=D8UUNZTKuBXoAeWKWL3SLq_IUysOBfkC7Svgl1eYHIM,1948
25
25
  digitalmarketplace_frontend_jinja/templates/components/question-format-hint/macro.html,sha256=x6xTgRJgucQ-FVzeTmHLRrD0ocKIOzzGJRIzYsNZIXw,368
@@ -59,7 +59,7 @@ digitalmarketplace_frontend_jinja/templates/errors/410.html,sha256=ub7W3MRbIPQvj
59
59
  digitalmarketplace_frontend_jinja/templates/errors/500.html,sha256=x1Lu8ATSPGGSXvjj1ZHVq-h9eBWLiUK2MxPHwqZCiDQ,408
60
60
  digitalmarketplace_frontend_jinja/templates/layouts/_custom_dimensions.html,sha256=SglUULyYlEWLWYQ7luwKONuI2BnWbOnd5MOIblKZR3E,731
61
61
  digitalmarketplace_frontend_jinja/templates/layouts/_site_verification.html,sha256=6YWaREd5cPw1u5V9zsVaCOWG_uJ9SUMNdZj9fLK2jU8,142
62
- ccs_digitalmarketplace_frontend_jinja-4.6.0.dist-info/METADATA,sha256=1T772meMXIzA8QzqsLAecFwx6xY1tB_bQu5mmTlcs24,15011
63
- ccs_digitalmarketplace_frontend_jinja-4.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
- ccs_digitalmarketplace_frontend_jinja-4.6.0.dist-info/top_level.txt,sha256=MeEUNXXhcYp_c2URA_Npkpxj50E3hc3Eir0PWJjNIrw,34
65
- ccs_digitalmarketplace_frontend_jinja-4.6.0.dist-info/RECORD,,
62
+ ccs_digitalmarketplace_frontend_jinja-4.7.0.dist-info/METADATA,sha256=vo84wwXYiSEAPfAa8hbws8LF2Yb5BR3KjhFJeaNOB4I,15238
63
+ ccs_digitalmarketplace_frontend_jinja-4.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
64
+ ccs_digitalmarketplace_frontend_jinja-4.7.0.dist-info/top_level.txt,sha256=MeEUNXXhcYp_c2URA_Npkpxj50E3hc3Eir0PWJjNIrw,34
65
+ ccs_digitalmarketplace_frontend_jinja-4.7.0.dist-info/RECORD,,
@@ -1 +1 @@
1
- __version__ = '4.6.0'
1
+ __version__ = '4.7.0'
@@ -1,8 +1,10 @@
1
1
  {% macro digitalmarketplaceQuestionCheckboxTree(params) %}
2
2
  {%- from "govuk_frontend_jinja/components/fieldset/macro.html" import govukFieldset -%}
3
3
  {%- from "govuk_frontend_jinja/components/checkboxes/macro.html" import govukCheckboxes -%}
4
+ {%- from "govuk_frontend_jinja/components/hint/macro.html" import govukHint -%}
4
5
  {%- from "govuk_frontend_jinja/components/accordion/macro.html" import govukAccordion -%}
5
6
  {%- from "govuk_frontend_jinja/components/error-message/macro.html" import govukErrorMessage -%}
7
+ {%- from "digitalmarketplace_frontend_jinja/components/question-format-hint/macro.html" import digitalmarketplaceQuestionFormatHint -%}
6
8
 
7
9
  {% set name = params.question.id %}
8
10
  {% set questionText = params.question.question + " ({})".format(params.question.optional_text if params.question.optional_text else "optional") if params.question.optional else params.question.question %}
@@ -18,9 +20,17 @@
18
20
  "classes": 'dm-checkbox-tree',
19
21
  "attributes": {
20
22
  'data-module': 'dm-question-checkbox-tree',
21
- 'aria-describedby': "input-" + name if errorMessage
23
+ 'aria-describedby': "input-" + name if errorMessage,
24
+ 'data-item-name-singular': params.question.item_name.singular if params.question.item_name else "category",
25
+ 'data-item-name-plural': params.question.item_name.plural if params.question.item_name else "categories"
22
26
  }
23
27
  }) %}
28
+ {% if params.question.hint or params.question.question_advice %}
29
+ {{ govukHint({
30
+ "html": digitalmarketplaceQuestionFormatHint(params.question)
31
+ }) }}
32
+ {% endif %}
33
+
24
34
  {% if errorMessage %}
25
35
  {{ govukErrorMessage({
26
36
  "text": errorMessage["message"],
@@ -30,9 +40,11 @@
30
40
 
31
41
  <div class="govuk-grid-row">
32
42
  <div class="dm-checkbox-tree__summary govuk-grid-column-one-third">
33
- <p class="govuk-body">
34
- You can choose up to {{ params.question.number_of_items }} categories.
35
- </p>
43
+ {% if params.question.number_of_items %}
44
+ <p class="govuk-body">
45
+ You can choose up to {{ params.question.number_of_items }} {{ params.question.item_name.plural if params.question.item_name else "categories" }}.
46
+ </p>
47
+ {% endif %}
36
48
  <p class="dm-checkbox-tree__summary-total govuk-body">
37
49
  <strong class="dm-checkbox-tree__summary-total-selected"></strong>
38
50
  <span class="dm-checkbox-tree__summary-total-selected-text"></span>
@@ -54,7 +66,7 @@
54
66
  {% endfor %}
55
67
 
56
68
  {% set summaryHtml %}
57
- {{ option.options | length }} categories<span class="dm-checkbox-tree__options-number-selected"></span>
69
+ {{ option.options | length }} {{ params.question.item_name.plural if params.question.item_name else "categories" }}<span class="dm-checkbox-tree__options-number-selected"></span>
58
70
  {% endset %}
59
71
 
60
72
  {% set _accordionItems = accordionItems.append({