GUAC-801 Improved styling of password change dialog.

This commit is contained in:
James Muehlner
2015-03-10 21:28:38 -07:00
parent b32f358e7e
commit d31d214831
5 changed files with 39 additions and 4 deletions

View File

@@ -199,6 +199,17 @@ angular.module('home').controller('homeController', ['$scope', '$injector',
return;
}
// Verify that the new password is not blank
if (!$scope.newPassword) {
$scope.showStatus({
className : 'error',
title : 'HOME.DIALOG_HEADER_ERROR',
text : 'HOME.ERROR_PASSWORD_BLANK',
actions : [ ACKNOWLEDGE_ACTION ]
});
return;
}
// Save the user with the new password
userService.updateUserPassword(currentUserID, $scope.oldPassword, $scope.newPassword)
.success(function passwordUpdated() {