overleaf/services/web/app/views/_mixins/reconfirm_affiliation.pug

39 lines
1.7 KiB
Text
Raw Normal View History

mixin reconfirmAffiliationNotification(location)
.reconfirm-notification(ng-controller="UserAffiliationsReconfirmController")
div(ng-if="!reconfirm[userEmail.email].reconfirmationSent" style="width:100%;")
i.fa.fa-warning
button.btn-reconfirm.btn.btn-sm.btn-info(
data-location=location
ng-if="!ui.sentReconfirmation"
ng-click="requestReconfirmation($event, userEmail)"
ng-disabled="ui.isMakingRequest"
) #{translate("confirm_affiliation")}
| !{translate("are_you_still_at", {institutionName: '{{userEmail.affiliation.institution.name}}'}, ['strong'])} 
if location == '/user/settings'
| !{translate('please_reconfirm_institutional_email', {}, [{ name: 'span' }])}
span(ng-if="userEmail.default")  #{translate('need_to_add_new_primary_before_remove')}
else
| !{translate("please_reconfirm_institutional_email", {}, [{name: 'a', attrs: {href: '/user/settings?remove={{userEmail.email}}' }}])}
|  
a(href="/learn/how-to/Institutional_Email_Reconfirmation") #{translate("learn_more")}
div(ng-if="reconfirm[userEmail.email].reconfirmationSent")
| !{translate("please_check_your_inbox_to_confirm", {institutionName: '{{userEmail.affiliation.institution.name}}'}, ['strong'])}
|  
button(
class="btn-inline-link"
ng-click="requestReconfirmation($event, userEmail)"
ng-disabled="ui.isMakingRequest"
) #{translate('resend_confirmation_email')}
mixin reconfirmedAffiliationNotification()
.alert.alert-info
.reconfirm-notification
div(style="width:100%;")
//- extra div for flex styling
| !{translate("your_affiliation_is_confirmed", {institutionName: '{{userEmail.affiliation.institution.name}}'}, ['strong'])} #{translate('thank_you_exclamation')}