diff --git a/app/views/simplified-account/settings/card-types/_card-types-checkboxes.njk b/app/views/simplified-account/settings/card-types/_card-types-checkboxes.njk deleted file mode 100644 index b3d52f88a..000000000 --- a/app/views/simplified-account/settings/card-types/_card-types-checkboxes.njk +++ /dev/null @@ -1,45 +0,0 @@ - -

Choose which credit and debit cards you want to accept.

- -
- - - {{ - govukCheckboxes({ - idPrefix: "debit", - name: "debit", - classes: "with-border govuk-!-padding-top-3 pay-!-border-top", - fieldset: { - legend: { - text: "Debit cards", - classes: "govuk-fieldset__legend--s" - } - }, - items: cardTypes.debitCards - }) - }} - - {{ - govukCheckboxes({ - idPrefix: "credit", - name: "credit", - classes: "with-border govuk-!-padding-top-3 pay-!-border-top", - fieldset: { - legend: { - text: "Credit cards", - classes: "govuk-fieldset__legend--s" - } - }, - items: cardTypes.creditCards - }) - }} - - {{ - govukButton({ - text: 'Save changes', - attributes: { - id: "save-card-types" - } - }) - }} -
diff --git a/app/views/simplified-account/settings/card-types/_card-types-list.njk b/app/views/simplified-account/settings/card-types/_card-types-list.njk deleted file mode 100644 index c481b71df..000000000 --- a/app/views/simplified-account/settings/card-types/_card-types-list.njk +++ /dev/null @@ -1,21 +0,0 @@ -{% for category, items in cardTypes %} - {% if (items.length > 0) %} -

- {{ category }} -

- {% set cardList = [] %} - {% for card in items %} - {% set cardListItem = { - key: { - text: card, - classes: "govuk-!-display-none" - }, - value: { - html: card - } - } %} - {% set cardList = (cardList.push(cardListItem), cardList) %} - {% endfor %} - {{ govukSummaryList({ rows: cardList }) }} - {% endif %} -{% endfor %} diff --git a/app/views/simplified-account/settings/card-types/index.njk b/app/views/simplified-account/settings/card-types/index.njk index e9b19de41..f1db83e0e 100644 --- a/app/views/simplified-account/settings/card-types/index.njk +++ b/app/views/simplified-account/settings/card-types/index.njk @@ -23,9 +23,71 @@

Card types

{% if isAdminUser %} - {% include "./_card-types-checkboxes.njk" %} +

Choose which credit and debit cards you want to accept.

+
+ + + {{ + govukCheckboxes({ + idPrefix: "debit", + name: "debit", + classes: "with-border govuk-!-padding-top-3 pay-!-border-top", + fieldset: { + legend: { + text: "Debit cards", + classes: "govuk-fieldset__legend--s" + } + }, + items: cardTypes.debitCards + }) + }} + + {{ + govukCheckboxes({ + idPrefix: "credit", + name: "credit", + classes: "with-border govuk-!-padding-top-3 pay-!-border-top", + fieldset: { + legend: { + text: "Credit cards", + classes: "govuk-fieldset__legend--s" + } + }, + items: cardTypes.creditCards + }) + }} + + {{ + govukButton({ + text: 'Save changes', + attributes: { + id: "save-card-types" + } + }) + }} +
{% else %} - {% include "./_card-types-list.njk" %} + {% for category, items in cardTypes %} + {% if (items.length > 0) %} +

+ {{ category }} +

+ {% set cardList = [] %} + {% for card in items %} + {% set cardListItem = { + key: { + text: card, + classes: "govuk-!-display-none" + }, + value: { + html: card + } + } %} + {% set cardList = (cardList.push(cardListItem), cardList) %} + {% endfor %} + {{ govukSummaryList({ rows: cardList }) }} + {% endif %} + {% endfor %} {% endif %} {% endblock %}