From b156a27d1f4c5e7876c0413186d98053ef0cfd15 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 28 Mar 2017 22:04:09 -0400 Subject: [PATCH] api form --- src/app/organization/organizationPeopleInviteController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/organization/organizationPeopleInviteController.js b/src/app/organization/organizationPeopleInviteController.js index 67cb91ae33..e6b62c550e 100644 --- a/src/app/organization/organizationPeopleInviteController.js +++ b/src/app/organization/organizationPeopleInviteController.js @@ -54,6 +54,7 @@ return Object.keys($scope.selectedSubvaults).length === $scope.subvaults.length; }; + $scope.submitPromise = null; $scope.submit = function (model) { var subvaults = []; for (var subvaultId in $scope.selectedSubvaults) { @@ -62,13 +63,13 @@ } } - apiService.organizationUsers.invite({ orgId: $state.params.orgId }, { + $scope.submitPromise = apiService.organizationUsers.invite({ orgId: $state.params.orgId }, { email: model.email, type: model.type, subvaults: subvaults }, function () { $uibModalInstance.close(); - }); + }).$promise; }; $scope.close = function () {