Skip to content

Commit

Permalink
added variables so checkboxes on theme for sbh2 are updated correctly…
Browse files Browse the repository at this point in the history
… according to config
  • Loading branch information
danielfang97 committed Dec 16, 2024
1 parent 698b166 commit e9c3e69
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/views/admin/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const extend = require('xtend')
module.exports = function (req, res) {
if (req.method === 'POST') {
if (req.body.showModuleInteractions) {
config.set('showModuleInteractions', true)
config.set('showModuleInteractions', req.body.showModuleInteractions)
} else {
config.set('showModuleInteractions', false)
config.set('showModuleInteractions', true)
}
if (req.body.removePublicEnabled) {
config.set('removePublicEnabled', true)
config.set('removePublicEnabled', req.body.removePublicEnabled)
} else {
config.set('removePublicEnabled', false)
config.set('removePublicEnabled', true)
}
if (req.body.requireLogin) {
config.set('requireLogin', true)
config.set('requireLogin', req.body.requireLogin)
} else {
config.set('requireLogin', false)
}
Expand Down Expand Up @@ -47,6 +47,9 @@ function form (req, res) {
frontPageText: config.get('frontPageText'),
firstLaunch: config.get('firstLaunch'),
altHome: config.get('altHome'),
showModuleInteractions: config.get('showModuleInteractions'),
removePublicEnabled: config.get('removePublicEnabled'),
requireLogin: config.get('requireLogin'),
currentTheme: currentTheme,
themeParameters: themeParameters
}
Expand Down

0 comments on commit e9c3e69

Please sign in to comment.