mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04: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(
|
this.resize = () => {
|
||||||
Math.max(
|
|
||||||
this.initialHeight,
|
this.$textbox.height(
|
||||||
this.$background.outerHeight()
|
Math.max(
|
||||||
)
|
this.initialHeight,
|
||||||
);
|
this.$background.outerHeight()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if ('stickAtBottomWhenScrolling' in GOVUK) {
|
||||||
|
GOVUK.stickAtBottomWhenScrolling.recalculate();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
this.escapedMessage = () => $('<div/>').text(this.$textbox.val()).html();
|
this.escapedMessage = () => $('<div/>').text(this.$textbox.val()).html();
|
||||||
|
|
||||||
|
|||||||
@@ -35,3 +35,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% 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" %}
|
{% extends "withnav_template.html" %}
|
||||||
{% from "components/textbox.html" import textbox %}
|
{% 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/radios.html" import radios %}
|
||||||
{% from "components/form.html" import form_wrapper %}
|
{% from "components/form.html" import form_wrapper %}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
{% if current_user.platform_admin %}
|
{% if current_user.platform_admin %}
|
||||||
{{ radios(form.process_type) }}
|
{{ radios(form.process_type) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ page_footer(
|
{{ sticky_page_footer(
|
||||||
'Save'
|
'Save'
|
||||||
) }}
|
) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "withnav_template.html" %}
|
{% extends "withnav_template.html" %}
|
||||||
{% from "components/textbox.html" import textbox %}
|
{% 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/radios.html" import radios %}
|
||||||
{% from "components/form.html" import form_wrapper %}
|
{% from "components/form.html" import form_wrapper %}
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
|
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
|
||||||
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
|
||||||
{{ page_footer(
|
{{ sticky_page_footer(
|
||||||
'Save'
|
'Save'
|
||||||
) }}
|
) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "withnav_template.html" %}
|
{% extends "withnav_template.html" %}
|
||||||
{% from "components/textbox.html" import textbox %}
|
{% 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/radios.html" import radios %}
|
||||||
{% from "components/form.html" import form_wrapper %}
|
{% from "components/form.html" import form_wrapper %}
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
{% if current_user.platform_admin %}
|
{% if current_user.platform_admin %}
|
||||||
{{ radios(form.process_type) }}
|
{{ radios(form.process_type) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ page_footer(
|
{{ sticky_page_footer(
|
||||||
'Save'
|
'Save'
|
||||||
) }}
|
) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user