mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-23 11:51:05 -05:00
Merge pull request #2658 from alphagov/sticky-footer-edit
Use sticky footer on edit template page
This commit is contained in:
@@ -32,12 +32,20 @@
|
||||
|
||||
};
|
||||
|
||||
this.resize = () => this.$textbox.height(
|
||||
Math.max(
|
||||
this.initialHeight,
|
||||
this.$background.outerHeight()
|
||||
)
|
||||
);
|
||||
this.resize = () => {
|
||||
|
||||
this.$textbox.height(
|
||||
Math.max(
|
||||
this.initialHeight,
|
||||
this.$background.outerHeight()
|
||||
)
|
||||
);
|
||||
|
||||
if ('stickAtBottomWhenScrolling' in GOVUK) {
|
||||
GOVUK.stickAtBottomWhenScrolling.recalculate();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
this.escapedMessage = () => $('<div/>').text(this.$textbox.val()).html();
|
||||
|
||||
|
||||
@@ -35,3 +35,9 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro sticky_page_footer(button_text=None) %}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ page_footer(button_text) }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -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,7 +23,7 @@
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
{{ sticky_page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
|
||||
@@ -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,7 +23,7 @@
|
||||
{% endif %}
|
||||
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
|
||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
||||
{{ page_footer(
|
||||
{{ sticky_page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
{{ sticky_page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user