Files
notifications-admin/app/templates/components/page-footer.html
Chris Hill-Scott 4d10eec1e2 Rename submit_form component to page_footer
Submit form was
- a confusing name in itself
- not descriptive, because it also has an optional ‘back’ link

This commit also puts this component in as many pages as possible, stripping
out any hard-coded buttons and links.

It replaces any usage of buttons for ‘back’, because these are links, not
buttons (ie they don’t change any data).
2016-01-08 15:02:08 +00:00

12 lines
523 B
HTML

{% macro page_footer(button_text=None, back_link=False, back_link_text="Back", destructive=False) %}
<div class="page-footer">
{% if button_text %}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<input type="submit" class="button{% if destructive %}-destructive{% endif %}" value="{{ button_text }}" />
{% endif %}
{% if back_link %}
<a class="page-footer-back-link" role="button" href="{{ back_link }}">{{ back_link_text }}</a>
{% endif %}
</div>
{% endmacro %}