2014-03-06 12:11:14 +11:00
|
|
|
angular.module("umbraco.install").controller("Umbraco.Install.UserController", function($scope, installerService) {
|
|
|
|
|
|
|
|
|
|
$scope.passwordPattern = /.*/;
|
|
|
|
|
if ($scope.installer.current.model.minNonAlphaNumericLength > 0) {
|
|
|
|
|
var exp = "";
|
|
|
|
|
for (var i = 0; i < $scope.installer.current.model.minNonAlphaNumericLength; i++) {
|
|
|
|
|
exp += ".*[\\W].*";
|
|
|
|
|
}
|
|
|
|
|
//replace duplicates
|
|
|
|
|
exp = exp.replace(".*.*", ".*");
|
|
|
|
|
$scope.passwordPattern = new RegExp(exp);
|
|
|
|
|
}
|
2014-02-26 15:51:01 +01:00
|
|
|
|
|
|
|
|
$scope.validateAndInstall = function(){
|
|
|
|
|
installerService.install();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.validateAndForward = function(){
|
2014-03-03 08:57:00 +01:00
|
|
|
if(this.myForm.$valid){
|
|
|
|
|
installerService.forward();
|
|
|
|
|
}
|
2014-02-26 15:51:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
});
|