Fixes installer database dropdown default value
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, $http, installerService){
|
||||
|
||||
$scope.checking = false;
|
||||
$scope.dbs = [
|
||||
{name: 'Embedded database SQL MEH', id: 0},
|
||||
{name: 'Microsft SQL Server', id: 1},
|
||||
{name: 'MySQL', id: 2},
|
||||
{name: 'Custom connection-string', id: -1}];
|
||||
|
||||
if(installerService.status.current.model.dbType === undefined){
|
||||
installerService.status.current.model.dbType = 0;
|
||||
}
|
||||
|
||||
$scope.validateAndForward = function(){
|
||||
if(!$scope.checking && this.myForm.$valid){
|
||||
$scope.checking = true;
|
||||
|
||||
@@ -6,27 +6,16 @@
|
||||
</p>
|
||||
|
||||
<form name="myForm" class="form-horizontal" novalidate ng-submit="validateAndForward();">
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<legend>What type of database do you use?</legend>
|
||||
<label class="control-label" for="dbType">Database type</label>
|
||||
<div class="controls">
|
||||
<select name="dbType" ng-model="installer.current.model.dbType" required>
|
||||
<optgroup>
|
||||
<option value="0">Embedded database SQL CE</option>
|
||||
<option value="1">Microsft SQL Server</option>
|
||||
<option value="2">MySQL</option>
|
||||
</optgroup>
|
||||
<optgroup>
|
||||
<option value="-1">Custom connection-string</option>
|
||||
</optgroup>
|
||||
<select name="dbType" ng-options="db.id as db.name for db in dbs" ng-model="installer.current.model.dbType" required>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div ng-if="installer.current.model.dbType == 0">
|
||||
<div class="controls" ng-if="installer.current.model.dbType == 0">
|
||||
<p>Great!, no need to configure anything then, you simply click the <strong>continue</strong> button below to continue to the next step</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user