mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 21:44:11 -04:00
This commit adds logic to: - take the list of selected folders and templates - split it into two lists (of folders and templates) - `POST` that data to the API, to effect the movement of said folders and templates I’ve tried to architect it in such a way that we can easily add more template ‘operations’ in the future, as we add more forms to the choose template page.
38 lines
1.2 KiB
HTML
38 lines
1.2 KiB
HTML
{% macro page_footer(
|
|
button_text=None,
|
|
button_name=None,
|
|
button_value=None,
|
|
destructive=False,
|
|
back_link=False,
|
|
back_link_text="Back",
|
|
secondary_link=False,
|
|
secondary_link_text=None,
|
|
delete_link=False,
|
|
delete_link_text="delete"
|
|
) %}
|
|
<div class="page-footer">
|
|
{% if button_text %}
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
<button
|
|
type="submit"
|
|
class="button{% if destructive %}-destructive{% endif %}"
|
|
{% if button_name %}name="{{ button_name }}"{% endif %}
|
|
{% if button_value %}value="{{ button_value }}"{% endif %}
|
|
>
|
|
{{- button_text -}}
|
|
</button>
|
|
{% endif %}
|
|
{% if back_link %}
|
|
<a class="page-footer-back-link" href="{{ back_link }}">{{ back_link_text }}</a>
|
|
{% endif %}
|
|
{% if delete_link %}
|
|
<span class="page-footer-delete-link {% if not button_text %}page-footer-delete-link-without-button{% endif %}">
|
|
<a href="{{ delete_link }}">{{ delete_link_text }}</a>
|
|
</span>
|
|
{% endif %}
|
|
{% if secondary_link and secondary_link_text %}
|
|
<a class="page-footer-secondary-link" href="{{ secondary_link }}">{{ secondary_link_text }}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|