mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-25 19:50:49 -04:00
Includes: - make 'remove team member' link, on edit member permissions page, destructive - convert missed links on /features pages - convert missed links on /using-notify/guidance and sub pages - give links in browse-lists back their size and weight (needed for lists of live and trial services on Platform Admin) - give links on Platform Admin inbound numbers page back their size and weight - update links in JS tests
43 lines
1.6 KiB
HTML
43 lines
1.6 KiB
HTML
{% from "components/button/macro.njk" import govukButton %}
|
|
|
|
{% macro page_footer(
|
|
button_text=None,
|
|
button_name=None,
|
|
button_value=None,
|
|
destructive=False,
|
|
secondary_link=False,
|
|
secondary_link_text=None,
|
|
delete_link=False,
|
|
delete_link_text="delete",
|
|
centered_button=False
|
|
) %}
|
|
<div class="page-footer">
|
|
{% if button_text %}
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
|
|
{% set button_data = {"text": button_text, "classes": "page-footer__button"} %}
|
|
{% if destructive %}{% set _ = button_data.update({"classes": "govuk-button--warning page-footer__button"}) %}{% endif %}
|
|
{% if centered_button %}{% set _ = button_data.update({"classes": "page-footer__button--centred"}) %}{% endif %}
|
|
{% if button_name %}{% set _ = button_data.update({"name": button_name}) %}{% endif %}
|
|
{% if button_value %}{% set _ = button_data.update({"value": button_value}) %}{% endif %}
|
|
|
|
{{ govukButton(button_data) }}
|
|
|
|
{% endif %}
|
|
{% if delete_link %}
|
|
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
|
|
<a class="govuk-link govuk-link--destructive" href="{{ delete_link }}">{{ delete_link_text }}</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if secondary_link and secondary_link_text %}
|
|
<a class="govuk-link govuk-link--no-visited-state page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% macro sticky_page_footer(button_text=None) %}
|
|
<div class="js-stick-at-bottom-when-scrolling">
|
|
{{ page_footer(button_text) }}
|
|
</div>
|
|
{% endmacro %}
|