Merge pull request #1678 from PeteDuncanson/patch-2

Fixed error label showing when you do a retry
This commit is contained in:
Claus
2017-07-12 15:47:32 +02:00
committed by GitHub

View File

@@ -1,28 +1,35 @@
angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseController", function($scope, $http, installerService){
$scope.checking = false;
$scope.invalidDbDns = false;
$scope.dbs = [
{name: 'Microsoft SQL Server Compact (SQL CE)', id: 0},
{name: 'Microsoft SQL Server', id: 1},
{ name: 'Microsoft SQL Azure', id: 3 },
{ name: 'MySQL', id: 2 },
{name: 'Custom connection string', id: -1}];
{ name: 'Microsoft SQL Server Compact (SQL CE)', id: 0},
{ name: 'Microsoft SQL Server', id: 1},
{ name: 'Microsoft SQL Azure', id: 3 },
{ name: 'MySQL', id: 2 },
{ name: 'Custom connection string', id: -1}
];
if(installerService.status.current.model.dbType === undefined){
if ( installerService.status.current.model.dbType === undefined ) {
installerService.status.current.model.dbType = 0;
}
$scope.validateAndForward = function(){
if(!$scope.checking && this.myForm.$valid){
$scope.validateAndForward = function(){
if ( !$scope.checking && this.myForm.$valid ) {
$scope.checking = true;
$scope.invalidDbDns = false;
var model = installerService.status.current.model;
$http.post(Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection",
model).then(function(response){
$http.post(
Umbraco.Sys.ServerVariables.installApiBaseUrl + "PostValidateDatabaseConnection",
model ).then( function( response ) {
if(response.data === "true"){
if ( response.data === "true" ) {
installerService.forward();
}else{
}
else {
$scope.invalidDbDns = true;
}
@@ -33,4 +40,4 @@ angular.module("umbraco.install").controller("Umbraco.Installer.DataBaseControll
});
}
};
});
});