mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 09:29:22 -04:00
Add context to 'Move' button on /templates
Includes adding an extra parameter to the page_footer component.
This commit is contained in:
@@ -246,7 +246,9 @@
|
||||
this.itemsSelectedButtons = $(`
|
||||
<div id="items_selected">
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
<button class="govuk-button govuk-button--secondary govuk-!-margin-right-3 govuk-!-margin-bottom-1" value="move-to-existing-folder">Move</button>
|
||||
<button class="govuk-button govuk-button--secondary govuk-!-margin-right-3 govuk-!-margin-bottom-1" value="move-to-existing-folder">
|
||||
Move<span class="govuk-visually-hidden"> selection to folder</span>
|
||||
</button>
|
||||
<button class="govuk-button govuk-button--secondary govuk-!-margin-bottom-1" value="move-to-new-folder">Add to new folder</button>
|
||||
<div class="template-list-selected-counter" aria-hidden="true">
|
||||
<span class="template-list-selected-counter__count" aria-hidden="true">
|
||||
|
||||
@@ -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) }}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ radios_nested(templates_and_folders_form.move_to, move_to_children, option_hints=option_hints) }}
|
||||
</div>
|
||||
<div class="js-will-stick-at-bottom-when-scrolling">
|
||||
{{ page_footer('Move', button_name='operation', button_value='move-to-existing-folder') }}
|
||||
{{ page_footer('Move', button_name='operation', button_value='move-to-existing-folder', button_text_hidden_suffix=' selection to folder') }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="move_to_new_folder_form">
|
||||
|
||||
Reference in New Issue
Block a user