Skip to content

Commit

Permalink
Make sure the correct plugin status is used in the plugin install page.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSurgisonGDS committed Oct 6, 2022
1 parent 5bdfb98 commit 615003c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
In terminal, run:</p>
<p><code>{{ command }}</code></p>
<p>
When you've installed the plug-in, restart your prototype in the terminal by typing: npx govuk-prototype-kit start</p>
When you've {{ verb.status }} the plug-in, restart your prototype in the terminal by typing: npx govuk-prototype-kit start</p>
<p>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions lib/routes/prototype-admin-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ router.get('/plugins/install', async (req, res) => {
res.status(404).send('Plugin not found')
return
}

res.render(getManagementView('plugin-install-or-uninstall.njk'), {
currentPage: pageName,
currentUrl: req.originalUrl,
Expand All @@ -425,7 +426,8 @@ router.get('/plugins/install', async (req, res) => {
command: req.query.mode === 'upgrade' ? chosenPlugin.upgradeCommand : chosenPlugin.installCommand,
verb: {
title: req.query.mode === 'upgrade' ? 'Upgrade' : 'Install',
para: req.query.mode === 'upgrade' ? 'upgrade' : 'install'
para: req.query.mode === 'upgrade' ? 'upgrade' : 'install',
status: req.query.mode === 'upgrade' ? 'upgraded' : 'installed'
}
})
})
Expand Down Expand Up @@ -462,7 +464,8 @@ router.get('/plugins/uninstall', async (req, res) => {
chosenPlugin,
verb: {
title: 'Uninstall',
para: 'uninstall'
para: 'uninstall',
status: 'uninstalled'
}
})
})
Expand Down

0 comments on commit 615003c

Please sign in to comment.