diff --git a/services/web/app/views/user/settings/user-affiliations.pug b/services/web/app/views/user/settings/user-affiliations.pug index e9ea5dfc69..393be19aa6 100644 --- a/services/web/app/views/user/settings/user-affiliations.pug +++ b/services/web/app/views/user/settings/user-affiliations.pug @@ -178,7 +178,10 @@ form.row( td.text-center(colspan="3", ng-if="ui.isResendingConfirmation") i.fa.fa-fw.fa-spin.fa-refresh(aria-hidden="true") |  #{translate("sending")}... - td.text-center(colspan="3", ng-if="!ui.isLoadingEmails && !ui.isResendingConfirmation") + td.text-center.text-capitalize(colspan="3", ng-if="ui.isProcessing") + i.fa.fa-fw.fa-spin.fa-refresh(aria-hidden="true") + |  #{translate("processing")} + td.text-center(colspan="3", ng-if="!ui.isLoadingEmails && !ui.isResendingConfirmation && !ui.isProcessing") i.fa.fa-fw.fa-spin.fa-refresh(aria-hidden="true") |  #{translate("saving")} tr.affiliations-table-error-row( diff --git a/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js b/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js index 084fe596ae..b25b45c2ee 100644 --- a/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js +++ b/services/web/public/src/main/affiliations/controllers/UserAffiliationsController.js @@ -87,8 +87,9 @@ define(['base'], App => } $scope.linkInstitutionAcct = function(email, institutionId) { + _resetMakingRequestType() $scope.ui.isMakingRequest = true - $scope.ui.isLinkingInstitution = true + $scope.ui.isProcessing = true $window.location.href = `${ window.samlInitPath }?university_id=${institutionId}&auto=true&email=${email}` @@ -197,6 +198,7 @@ define(['base'], App => } $scope.resendConfirmationEmail = function(userEmail) { + _resetMakingRequestType() $scope.ui.isResendingConfirmation = true return _monitorRequest( UserAffiliationsDataService.resendConfirmationEmail(userEmail.email) @@ -232,16 +234,20 @@ define(['base'], App => return ($scope.ui.showManualUniversitySelectionUI = false) } + var _resetMakingRequestType = function() { + $scope.ui.isLoadingEmails = false + $scope.ui.isProcessing = false + $scope.ui.isResendingConfirmation = false + } + var _reset = function() { $scope.ui = { hasError: false, errorMessage: '', showChangeAffiliationUI: false, isMakingRequest: false, - isLinkingInstitution: false, isLoadingEmails: false, - isAddingNewEmail: false, - isResendingConfirmation: false + isAddingNewEmail: false } _resetAffiliationToChange() _resetNewAffiliation() @@ -277,6 +283,7 @@ define(['base'], App => // Populates the emails table var _getUserEmails = function() { + _resetMakingRequestType() $scope.ui.isLoadingEmails = true return _monitorRequest(UserAffiliationsDataService.getUserEmails()) .then(emails => {