mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-16 05:19:34 +00:00
Merge pull request #3605 from overleaf/jel-disabled-delete-primary
Add disabled delete button for the primary email GitOrigin-RevId: 8cb3285bdfce0909796ae60c13d8e8ebb1236d00
This commit is contained in:
parent
760e6719c1
commit
2bef6cd2e5
2 changed files with 24 additions and 11 deletions
|
@ -14,6 +14,26 @@ mixin btnMakePrimaryDisabled(tooltip)
|
|||
type="button"
|
||||
) #{translate("make_primary")}
|
||||
|
||||
mixin btnRemoveEmail()
|
||||
.affiliations-table-inline-action-disabled-wrapper(ng-if="userEmail.default")
|
||||
div(
|
||||
tooltip=translate("please_change_primary_to_remove")
|
||||
tooltip-enable="!ui.isMakingRequest"
|
||||
tooltip-placement="left"
|
||||
)
|
||||
button.btn.btn-sm.btn-danger(disabled)
|
||||
i.fa.fa-fw.fa-trash(aria-hidden="true")
|
||||
span.sr-only #{translate("please_change_primary_to_remove")}
|
||||
button.btn.btn-sm.btn-danger.affiliations-table-inline-action(
|
||||
ng-if="!userEmail.default"
|
||||
ng-click="removeUserEmail(userEmail)"
|
||||
ng-disabled="ui.isMakingRequest"
|
||||
tooltip=translate("remove")
|
||||
type="button"
|
||||
)
|
||||
i.fa.fa-fw.fa-trash(aria-hidden="true")
|
||||
span.sr-only #{translate("remove")}
|
||||
|
||||
form.row(
|
||||
ng-controller="UserAffiliationsController"
|
||||
name="affiliationsForm"
|
||||
|
@ -97,15 +117,7 @@ form.row(
|
|||
type="button"
|
||||
) #{translate("make_primary")}
|
||||
|
|
||||
button.btn.btn-sm.btn-danger.affiliations-table-inline-action(
|
||||
ng-if="!userEmail.default"
|
||||
ng-click="removeUserEmail(userEmail)"
|
||||
ng-disabled="ui.isMakingRequest"
|
||||
tooltip=translate("remove")
|
||||
type="button"
|
||||
)
|
||||
i.fa.fa-fw.fa-trash(aria-hidden="true")
|
||||
span.sr-only #{translate("remove")}
|
||||
+btnRemoveEmail()
|
||||
tr.affiliations-table-saml-row(ng-repeat-end ng-if="userEmail.affiliation && userEmail.affiliation && userEmail.ssoAvailable")
|
||||
td
|
||||
td(ng-attr-colspan="{{userEmail.samlProviderId ? '2' : '1'}}" ng-class="institutionAlreadyLinked(userEmail) ? '' : 'with-border'")
|
||||
|
|
|
@ -1341,5 +1341,6 @@
|
|||
"looks_like_youre_at": "It looks like you're at <0>__institutionName__</0>!",
|
||||
"add_affiliation": "Add Affiliation",
|
||||
"did_you_know_institution_providing_professional": "Did you know that __institutionName__ is providing <0>free __appName__ Professional features</0> to everyone at __institutionName__?",
|
||||
"add_email_to_claim_features": "Add an institutional email address to claim your features."
|
||||
}
|
||||
"add_email_to_claim_features": "Add an institutional email address to claim your features.",
|
||||
"please_change_primary_to_remove": "Please change your primary email in order to remove"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue