New API is more strict on the fields being present in change user information, so we have to delete them, not merely set them to empty strings

This commit is contained in:
Joseph Schorr 2014-03-17 14:59:40 -04:00
parent 314710a716
commit 05261c8455

View file

@ -1712,7 +1712,8 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
$scope.sentEmail = $scope.cuser.email;
// Reset the form.
$scope.cuser.repeatEmail = '';
delete $scope.cuser['repeatEmail'];
$scope.changeEmailForm.$setPristine();
}, function(result) {
$scope.updatingUser = false;
@ -1734,8 +1735,9 @@ function UserAdminCtrl($scope, $timeout, $location, ApiService, PlanService, Use
$scope.changePasswordSuccess = true;
// Reset the form
$scope.cuser.password = '';
$scope.cuser.repeatPassword = '';
delete $scope.cuser['password']
delete $scope.cuser['repeatPassword']
$scope.changePasswordForm.$setPristine();
// Reload the user.