Add context to 'Move' button on /templates

Includes adding an extra parameter to the
page_footer component.
This commit is contained in:
Tom Byers
2020-08-05 11:15:38 +01:00
parent a52aa406df
commit 0933485995
3 changed files with 10 additions and 2 deletions

View File

@@ -4,6 +4,7 @@
button_text=None,
button_name=None,
button_value=None,
button_text_hidden_suffix=None,
destructive=False,
secondary_link=False,
secondary_link_text=None,
@@ -20,6 +21,11 @@
{% 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 %}
{% if button_text_hidden_suffix %}
{% set _ = button_data.update({
"text": "", "html": button_text + "<span class=\"govuk-visually-hidden\"> " + button_text_hidden_suffix + "</span>"
}) %}
{% endif %}
{{ govukButton(button_data) }}