-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new template for check your answers page (#126)
* added new template for check your answers page * <th> tag converted to <td> to avoid bold question * check-your-answers template version 1 replaced by version 2 * cleaner solution using latest gov.uk frontend * version upgraded * class added to list and link * visuallyHidden class name to govuk-visually-hidden
- Loading branch information
1 parent
d3a5c1a
commit 51b1bb6
Showing
4 changed files
with
47 additions
and
47 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 |
---|---|---|
|
@@ -95,4 +95,4 @@ | |
font-weight: bold; | ||
padding-right: 0; | ||
} | ||
} | ||
} |
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
46 changes: 22 additions & 24 deletions
46
templates/look-and-feel/components/check-your-answers.njk
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,27 +1,25 @@ | ||
{% macro answer(question, answer, url, id) %} | ||
<div class="govuk-summary-list__row" id="cya-{{ safeId(id, question) }}"> | ||
<dt class="govuk-summary-list__value"> | ||
{{ question }} | ||
</dt> | ||
<dd class="govuk-summary-list__value"> | ||
{% if caller %} | ||
{{ caller() }} | ||
<tr class="govuk-table__row" id="cya-{{ safeId(id, question) }}"> | ||
<td class="govuk-table__cell govuk-!-width-one-third" scope="row">{{ question }}</td> | ||
<td class="govuk-table__cell govuk-!-width-two-thirds"> | ||
{% if caller %} | ||
{{ caller() }} | ||
{% else %} | ||
{% if isArray(answer) %} | ||
<ul class="govuk-list"> | ||
{% for line in answer %} | ||
<li>{{ line | safe }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
{% if isArray(answer) %} | ||
<ul class="govuk-list"> | ||
{% for line in answer %} | ||
<li>{{ line | safe }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
{{ answer | safe }} | ||
{% endif%} | ||
{% endif %} | ||
</dd> | ||
<dd class="govuk-summary-list__actions"> | ||
<a class="govuk-link" href="{{ url }}"> | ||
Change<span class="govuk-visually-hidden"> {{ question }}</span> | ||
</a> | ||
</dd> | ||
</div> | ||
{{ answer | safe }} | ||
{% endif%} | ||
{% endif %} | ||
</td> | ||
<td class="govuk-table__cell"> | ||
<a class="govuk-link" href="{{ url }}"> | ||
Change<span class="govuk-visually-hidden"> {{ question }}</span> | ||
</a> | ||
</td> | ||
</tr> | ||
{% 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