From 0df88f923c68e920278de53de99b851bbea0f9e3 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 14 Jan 2019 13:34:23 +0000 Subject: [PATCH] Refactor sticky button into component --- app/templates/components/page-footer.html | 6 ++++++ app/templates/views/edit-email-template.html | 10 ++++------ app/templates/views/edit-letter-template.html | 10 ++++------ app/templates/views/edit-sms-template.html | 10 ++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/templates/components/page-footer.html b/app/templates/components/page-footer.html index 31c1e94e3..3e24a5cd4 100644 --- a/app/templates/components/page-footer.html +++ b/app/templates/components/page-footer.html @@ -35,3 +35,9 @@ {% endif %} {% endmacro %} + +{% macro sticky_page_footer(button_text=None) %} +
+ {{ page_footer(button_text) }} +
+{% endmacro %} diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index b9c220ab5..b0ceb4b26 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -1,6 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/textbox.html" import textbox %} -{% from "components/page-footer.html" import page_footer %} +{% from "components/page-footer.html" import sticky_page_footer %} {% from "components/radios.html" import radios %} {% from "components/form.html" import form_wrapper %} @@ -23,11 +23,9 @@ {% if current_user.platform_admin %} {{ radios(form.process_type) }} {% endif %} -
- {{ page_footer( - 'Save' - ) }} -
+ {{ sticky_page_footer( + 'Save' + ) }}