Files
notifications-admin/app/templates/components/page-footer.html
Chris Hill-Scott 5233ee4bd9 Add a form to set priority of top 2 providers
Their priority should always add up to 100%. Currently we have to ensure
this by hand. Adding this form means there’s no way to not set their
combined priorities to 100%. And it’s a bit more of an intuitive UI than
two textboxes on separate pages.
2019-12-11 10:17:45 +00:00

40 lines
1.3 KiB
HTML

{% macro page_footer(
button_text=None,
button_name=None,
button_value=None,
destructive=False,
secondary_link=False,
secondary_link_text=None,
delete_link=False,
delete_link_text="delete",
centered_button=False
) %}
<div class="page-footer {% if centered_button %}page-footer-centered-button{% endif %}">
{% 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 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 %}
{% macro sticky_page_footer(button_text=None) %}
<div class="js-stick-at-bottom-when-scrolling">
{{ page_footer(button_text) }}
</div>
{% endmacro %}