mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
Use sticky footer on edit template page
If you have a long template it’s annoying to have to scroll all the way to the bottom to click save, when you’ve only changed a small thing near the staert of the content.
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();
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
<aside class="column-whole">
|
||||
{% include "partials/templates/guidance-formatting.html" %}
|
||||
|
||||
@@ -23,9 +23,11 @@
|
||||
{% 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(
|
||||
'Save'
|
||||
) }}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
<aside class="column-three-quarters">
|
||||
{% include "partials/templates/guidance-formatting-letters.html" %}
|
||||
|
||||
@@ -24,9 +24,11 @@
|
||||
{% if current_user.platform_admin %}
|
||||
{{ radios(form.process_type) }}
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
<aside class="column-whole">
|
||||
{% include "partials/templates/guidance-personalisation.html" %}
|
||||
|
||||
Reference in New Issue
Block a user