Skip to content

Commit 3730381

Browse files
Fix spacing issues in runner templates (#394)
1 parent 6de2315 commit 3730381

File tree

4 files changed

+49
-40
lines changed

4 files changed

+49
-40
lines changed

app/translations/messages.pot

+9-9
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ msgstr ""
390390
#: templates/individual_response/confirmation-post.html:21
391391
#: templates/individual_response/confirmation-text-message.html:31
392392
#: templates/individual_response/question.html:5 templates/interstitial.html:8
393-
#: templates/sectionsummary.html:11 templates/sectionsummary.html:53
393+
#: templates/sectionsummary.html:11 templates/sectionsummary.html:54
394394
msgid "Continue"
395395
msgstr ""
396396

@@ -773,6 +773,10 @@ msgstr ""
773773
msgid "If you can’t answer questions for this person"
774774
msgstr ""
775775

776+
#: templates/interstitial.html:32 templates/layouts/_questionnaire.html:26
777+
msgid "Save and continue"
778+
msgstr ""
779+
776780
#: templates/introduction.html:10
777781
msgid "Introduction"
778782
msgstr ""
@@ -1053,10 +1057,6 @@ msgstr ""
10531057
msgid "Hide"
10541058
msgstr ""
10551059

1056-
#: templates/layouts/_questionnaire.html:26
1057-
msgid "Save and continue"
1058-
msgstr ""
1059-
10601060
#: templates/layouts/_questionnaire.html:37
10611061
msgid "Choose another section and return to this later"
10621062
msgstr ""
@@ -1326,7 +1326,7 @@ msgid "No answer provided"
13261326
msgstr ""
13271327

13281328
#: templates/partials/summary/collapsible-summary.html:36
1329-
#: templates/partials/summary/list-summary.html:14
1329+
#: templates/partials/summary/list-summary.html:10
13301330
#: templates/partials/summary/summary.html:19
13311331
msgid "Change"
13321332
msgstr ""
@@ -1336,15 +1336,15 @@ msgstr ""
13361336
msgid "Change your answer for:"
13371337
msgstr ""
13381338

1339-
#: templates/partials/summary/list-summary.html:15
1339+
#: templates/partials/summary/list-summary.html:11
13401340
msgid "Change details for {item_name}"
13411341
msgstr ""
13421342

1343-
#: templates/partials/summary/list-summary.html:16
1343+
#: templates/partials/summary/list-summary.html:12
13441344
msgid "Remove"
13451345
msgstr ""
13461346

1347-
#: templates/partials/summary/list-summary.html:17
1347+
#: templates/partials/summary/list-summary.html:13
13481348
msgid "Remove {item_name}"
13491349
msgstr ""
13501350

templates/interstitial.html

+13
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,17 @@ <h1 class="question__title">{{ block.content.title }}</h1>
2323
{% set title = _("If you can’t answer questions for this person") %}
2424
{% include 'partials/individual-response-guidance.html' %}
2525
{% endif %}
26+
2627
{% endblock form_content %}
28+
29+
{% block submit_button %}
30+
{{
31+
onsButton({
32+
"text": continue_button_text | default(_("Save and continue")),
33+
"classes": "u-mt-l",
34+
"attributes": {
35+
"data-qa": "btn-submit"
36+
}
37+
})
38+
}}
39+
{% endblock %}
+23-28
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,38 @@
11
{% from "components/summary/_macro.njk" import onsSummary %}
22

3-
{% if list.editable %}
4-
{{ onsSummary({
5-
"withinQuestion": true,
6-
"summaries": [
7-
{
8-
"groups": [
9-
{
10-
"headers": ["Name of person", "Action"],
11-
"rows": map_list_collector_config(
12-
list.list_items,
13-
"person",
14-
_("Change"),
15-
_("Change details for {item_name}"),
16-
_("Remove"),
17-
_("Remove {item_name}")
18-
),
19-
}
20-
]
21-
}
22-
],
23-
"classes": "u-mt-s u-mb-m"
24-
}) }}
25-
{% else %}
3+
{% if list.list_items | length > 0 %}
4+
5+
{% if list.editable %}
6+
{% set headers = ["Name of person", "Action"] %}
7+
{% set rows = map_list_collector_config(
8+
list.list_items,
9+
"person",
10+
_("Change"),
11+
_("Change details for {item_name}"),
12+
_("Remove"),
13+
_("Remove {item_name}")
14+
) %}
15+
{% else %}
16+
{% set headers = ["Name of person"] %}
17+
{% set rows = map_list_collector_config(
18+
list.list_items,
19+
"person"
20+
) %}
21+
{% endif %}
22+
2623
{{ onsSummary({
2724
"withinQuestion": true,
2825
"summaries": [
2926
{
3027
"groups": [
3128
{
32-
"headers": ["Name of person"],
33-
"rows": map_list_collector_config(
34-
list.list_items,
35-
"person"
36-
),
29+
"headers": headers,
30+
"rows": rows,
3731
}
3832
]
3933
}
4034
],
4135
"classes": "u-mt-s u-mb-m"
4236
}) }}
37+
4338
{% endif %}

templates/sectionsummary.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ <h1>{{content.summary.title}}</h1>
2626
<h1>{{content.summary.title}}</h1>
2727
{% for summary in content.summary.custom_summary %}
2828
{% if summary.type == 'List' %}
29-
<div data-qa="{{summary.list_name}}-list-summary">
29+
30+
<div {{'class="u-mb-l"' if not loop.last }} data-qa="{{summary.list_name}}-list-summary">
3031
<h2>{{summary.title}}</h2>
3132
{% if summary.list and summary.list.list_items %}
3233
{% set list = summary.list %}
3334
{% include 'partials/summary/list-summary.html' %}
3435
{% elif summary.empty_list_text %}
35-
<div class="u-mb-s">
36+
<div>
3637
{{ summary.empty_list_text }}
3738
</div>
3839
{% endif %}
3940
{% if summary.add_link %}
40-
<div class="u-mb-l">
41+
<div>
4142
<a data-qa="add-item-link" href="{{summary.add_link}}">{{summary.add_link_text}}</a>
4243
</div>
4344
{% endif %}

0 commit comments

Comments
 (0)