diff --git a/app/assets/javascripts/templateFolderForm.js b/app/assets/javascripts/templateFolderForm.js
index 2d5ee8d98..8ff36863e 100644
--- a/app/assets/javascripts/templateFolderForm.js
+++ b/app/assets/javascripts/templateFolderForm.js
@@ -52,7 +52,7 @@
this.selectActionButtons();
});
- state.$el.append($cancel);
+ state.$el.find('[type=submit]').after($cancel);
};
this.addClearButton = function(state) {
@@ -71,7 +71,7 @@
this.makeButton = (text, fn) => $('')
.html(text)
- .addClass('page-footer-js-cancel')
+ .addClass('js-cancel')
.attr('tabindex', '0')
.on('click keydown', event => {
event.preventDefault();
@@ -136,7 +136,7 @@
- 1 selected
+ 1 selected
`;
diff --git a/app/assets/stylesheets/components/page-footer.scss b/app/assets/stylesheets/components/page-footer.scss
index d1076397a..e4073d47f 100644
--- a/app/assets/stylesheets/components/page-footer.scss
+++ b/app/assets/stylesheets/components/page-footer.scss
@@ -67,6 +67,10 @@
padding: 0.52632em 0.78947em 0.26316em 0.78947em;
}
+ .js-cancel {
+ margin: 0;
+ }
+
}
.align-button-with-textbox {
@@ -86,21 +90,3 @@
}
}
-
-.page-footer-js-cancel {
-
- text-decoration: underline;
- color: $govuk-blue;
- cursor: pointer;
-
- &:hover {
- color: $link-hover-colour;
- }
-
- &:focus,
- &:active, {
- background: $yellow;
- color: $govuk-blue;
- outline: 3px solid $yellow;
- }
-}
diff --git a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss
index 8357a262e..062d900f7 100644
--- a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss
+++ b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss
@@ -122,3 +122,26 @@
display: block;
margin-bottom: 5px;
}
+
+.js-cancel {
+
+ display: inline-block;
+ padding: 10px 10px 5px 10px;
+ margin-top: -10px;
+ margin-right: -10px;
+ text-decoration: underline;
+ color: $govuk-blue;
+ cursor: pointer;
+
+ &:hover {
+ color: $link-hover-colour;
+ }
+
+ &:focus,
+ &:active, {
+ background: $yellow;
+ color: $govuk-blue;
+ outline: none;
+ }
+
+}