diff --git a/services/web/app/views/project/list/notifications.pug b/services/web/app/views/project/list/notifications.pug index 6cf66dcf7c..9b8e804b0e 100644 --- a/services/web/app/views/project/list/notifications.pug +++ b/services/web/app/views/project/list/notifications.pug @@ -215,7 +215,8 @@ include ../../_mixins/reconfirm_affiliation | | #{translate('resending_confirmation_email')}… div(ng-if="!userEmail.confirmationInflight && userEmail.error" aria-live="polite") - | #{translate('generic_something_went_wrong')} + span(ng-if="userEmail.errorMessage") {{ userEmail.errorMessage }} + span(ng-if="!userEmail.errorMessage") #{translate('generic_something_went_wrong')} ui.list-unstyled(ng-controller="UserAffiliationsReconfirmController") li.notification-entry( diff --git a/services/web/frontend/js/main/project-list/notifications-controller.js b/services/web/frontend/js/main/project-list/notifications-controller.js index 1f1912c0f2..2969a3e3fd 100644 --- a/services/web/frontend/js/main/project-list/notifications-controller.js +++ b/services/web/frontend/js/main/project-list/notifications-controller.js @@ -104,6 +104,7 @@ App.controller('EmailNotificationController', function( $scope.resendConfirmationEmail = function(userEmail) { userEmail.confirmationInflight = true userEmail.error = false + userEmail.errorMessage = null UserAffiliationsDataService.resendConfirmationEmail(userEmail.email) .then(() => { userEmail.hide = true @@ -111,6 +112,7 @@ App.controller('EmailNotificationController', function( }) .catch(error => { userEmail.error = true + userEmail.errorMessage = error.data.message console.error(error) $scope.$emit('project-list:notifications-received') }) diff --git a/services/web/locales/en.json b/services/web/locales/en.json index ecae47aac0..30ca75804b 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -168,6 +168,7 @@ "institution_account_tried_to_add_not_affiliated": "This email is already associated with your account but not affiliated with this institution.", "institution_account_tried_to_add_affiliated_with_another_institution": "This email is already associated with your account but affiliated with another institution.", "institution_acct_successfully_linked": "Your __appName__ account was successfully linked to your __institutionName__ institutional account.", + "institution_account_tried_to_confirm_saml": "This email cannot be confirmed. Please remove the email from your account and try adding it again.", "institution_email_new_to_app": "Your __institutionName__ email (__email__) is new to __appName__.", "institutional": "Institutional", "doing_this_allow_log_in_through_institution": "Doing this will allow you to log in to __appName__ through your institution portal.",