mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
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).
This commit is contained in:
11
app/templates/components/page-footer.html
Normal file
11
app/templates/components/page-footer.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% 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 %}
|
||||
@@ -1,9 +0,0 @@
|
||||
{% macro submit_form(button_text, back_link=False, back_link_text="Back", destructive=False) %}
|
||||
<div class="submit-form">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||
<input type="submit" class="button{% if destructive %}-destructive{% endif %}" value="{{ button_text }}" />
|
||||
{% if back_link %}
|
||||
<a class="submit-form-back-link" role="button" href="{{ back_link }}">{{ back_link_text }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user