Fixes installer database dropdown default value

This commit is contained in:
perploug
2014-03-07 10:17:46 +01:00
parent 1e955fa813
commit 7104629ffd
2 changed files with 12 additions and 13 deletions

View File

@@ -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;

View File

@@ -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>