diff --git a/lib/manage-prototype-handlers.js b/lib/manage-prototype-handlers.js
index 02a9f16ca0..267c5749d3 100644
--- a/lib/manage-prototype-handlers.js
+++ b/lib/manage-prototype-handlers.js
@@ -714,12 +714,14 @@ async function getPluginsModeHandler (req, res, next) {
const pageName = `${verb.title} ${plugin.name}`
let returnLink
+ let cancelLink = plugin?.links.pluginDetails
if (req.query.returnTo === 'templates') {
returnLink = {
href: `${contextPath}/templates`,
text: 'Back to templates'
}
+ cancelLink = returnLink.href
} else if (mode === 'uninstall') {
returnLink = {
href: `${contextPath}/plugins`,
@@ -752,6 +754,7 @@ async function getPluginsModeHandler (req, res, next) {
verb,
isSameOrigin,
returnLink,
+ cancelLink,
relatedPlugins
})
}
diff --git a/lib/nunjucks/views/manage-prototype/plugin-install-or-uninstall.njk b/lib/nunjucks/views/manage-prototype/plugin-install-or-uninstall.njk
index 715239243b..b3e61f9d65 100644
--- a/lib/nunjucks/views/manage-prototype/plugin-install-or-uninstall.njk
+++ b/lib/nunjucks/views/manage-prototype/plugin-install-or-uninstall.njk
@@ -59,7 +59,7 @@
attributes: { id: "plugin-action-button" }
}) }}
- Cancel {{ verb.para }}
+ Cancel {{ verb.para }}
{% elseif not isSameOrigin %}