Replace straightforward buttons and links styled like buttons

This replaces the buttons that aren't part of a macro and that we don't
need to write additional styles for with their govuk-frontend equivalent.

There were some links that were styled to look like buttons, so these
have also been replaced with the new govuk-frontend macro.

There was one button on the `choose-account.html` template that was in a
section of code that was never reached - this has been deleted.
This commit is contained in:
Katie Smith
2020-01-30 14:01:13 +00:00
parent a62658ce8c
commit f3bb93f460
29 changed files with 151 additions and 60 deletions

View File

@@ -3,6 +3,7 @@
{% from "components/message-count-label.html" import message_count_label %}
{% from "components/page-header.html" import page_header %}
{% from "components/back-link/macro.njk" import govukBackLink %}
{% from "components/button/macro.njk" import govukButton %}
{% block service_page_title %}
{{ "Error" if error else "Preview of {}".format(template.name) }}
@@ -76,7 +77,8 @@
)}}" class='page-footer'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
{% if not error %}
<button type="submit" class="button">Send 1 {{ message_count_label(1, template.template_type, suffix='') }}</button>
{% set button_text %}Send 1 {{ message_count_label(1, template.template_type, suffix='') }}{% endset %}
{{ govukButton({ "text": button_text }) }}
{% endif %}
{% if template.template_type == 'letter' %}
<a href="{{ url_for('no_cookie.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download class="page-footer-right-aligned-link{% if error %}-without-button{% endif %}">Download as a PDF</a>