Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/src/installer/steps/user.controller.js
T

24 lines
713 B
JavaScript
Raw Normal View History

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
};
});