mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-17 02:43:32 +00:00
Merge pull request #2467 from overleaf/jel-settings-add-email
Reset new email affiliation when no affiliation GitOrigin-RevId: 0d18552ed0ad738d549e59004fe831110512e222
This commit is contained in:
parent
bf05d23793
commit
b1db115427
1 changed files with 10 additions and 8 deletions
|
@ -94,21 +94,18 @@ define(['base'], App =>
|
|||
universityDomain
|
||||
)
|
||||
} else {
|
||||
$scope.newAffiliation.university = null
|
||||
$scope.newAffiliation.department = null
|
||||
_resetAffiliationSuggestion()
|
||||
}
|
||||
return $q.resolve(
|
||||
`${userInputLocalAndDomain.local}@${universityDomain.hostname}`
|
||||
)
|
||||
})
|
||||
.catch(function() {
|
||||
$scope.newAffiliation.university = null
|
||||
$scope.newAffiliation.department = null
|
||||
_resetAffiliationSuggestion()
|
||||
return $q.reject(null)
|
||||
})
|
||||
} else {
|
||||
$scope.newAffiliation.university = null
|
||||
$scope.newAffiliation.department = null
|
||||
_resetAffiliationSuggestion()
|
||||
return $q.reject(null)
|
||||
}
|
||||
}
|
||||
|
@ -123,8 +120,7 @@ define(['base'], App =>
|
|||
}
|
||||
|
||||
$scope.selectUniversityManually = function() {
|
||||
$scope.newAffiliation.university = null
|
||||
$scope.newAffiliation.department = null
|
||||
_resetAffiliationSuggestion()
|
||||
return ($scope.ui.showManualUniversitySelectionUI = true)
|
||||
}
|
||||
|
||||
|
@ -261,6 +257,12 @@ define(['base'], App =>
|
|||
return ($scope.ui.showManualUniversitySelectionUI = false)
|
||||
}
|
||||
|
||||
var _resetAffiliationSuggestion = () => {
|
||||
$scope.newAffiliation = {
|
||||
email: $scope.newAffiliation.email
|
||||
}
|
||||
}
|
||||
|
||||
var _resetMakingRequestType = function() {
|
||||
$scope.ui.isLoadingEmails = false
|
||||
$scope.ui.isProcessing = false
|
||||
|
|
Loading…
Reference in a new issue