updated web installer to auto-select the database if passed in via env var

v1.18.x
Julian Lam 10 years ago
parent 67eef3653b
commit 5487da9030

@ -65,6 +65,10 @@ function welcome(req, res) {
res.render('install/index', {
databases: databases,
dbBool: {
redis: nconf.get('database') === 'redis',
mongo: nconf.get('database') === 'mongo'
},
error: res.locals.error ? true : false,
success: res.locals.success ? true : false,
values: req.body

@ -99,8 +99,8 @@
<div class="col-sm-7 col-xs-12 input-field">
<label for="database">Database Type</label>
<select class="form-control" name="database">
<option value="redis">Redis</option>
<option value="mongo">MongoDB</option>
<option value="redis"<!-- IF dbBool.redis --> selected<!-- ENDIF dbBool.redis-->>Redis</option>
<option value="mongo"<!-- IF dbBool.mongo --> selected<!-- ENDIF dbBool.mongo-->>MongoDB</option>
</select>
</div>
<div class="col-sm-5 help-text" data-help="Leave the fields blank to use the default settings."><!-- IF error -->There was an error connecting to your database. Please try again.<!-- ENDIF error --></div>

Loading…
Cancel
Save