Add pre-setup password error reporting

This commit is contained in:
Johannes Zellner
2021-09-16 09:05:40 +02:00
parent a6301d2b6c
commit e0d7238a10
2 changed files with 8 additions and 5 deletions

View File

@@ -197,6 +197,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.useradd.error.username = error.message;
$scope.useradd_form.username.$setPristine();
$('#inputUserAddUsername').focus();
} else if (error.message.toLowerCase().indexOf('password') !== -1) {
$scope.useradd.error.password = error.message;
$scope.useradd_form.password.$setPristine();
$('#inputUserAddPassword').focus();
} else {
console.error('Unable to create user.', error.statusCode, error.message);
}