mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 04:50:49 +00:00
Merge pull request #2193 from overleaf/jel-account-settings-processing
Add processing message to affiliation UI GitOrigin-RevId: 2ceb9c7815da778f832715cac5c00bac3a32c127
This commit is contained in:
parent
398d355ffd
commit
86d844baf2
2 changed files with 15 additions and 5 deletions
|
@ -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(
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue