Merge pull request #2284 from overleaf/jel-user-settings

Add type="button" to prevent form submission

GitOrigin-RevId: 747d389ea52f5f32762f98bab3e647b14572c50d
This commit is contained in:
Timothée Alby 2019-10-25 15:21:22 +07:00 committed by sharelatex
parent 06de9233b8
commit 61243338be

View file

@ -63,6 +63,7 @@ form.row(
button.btn.btn-sm.btn-success(
ng-click="saveAffiliationChange(userEmail);"
ng-disabled="!(affiliationToChange.role && affiliationToChange.department)"
type="button"
) #{translate("save_or_cancel-save")}
|  #{translate("save_or_cancel-or" )} 
a(
@ -79,11 +80,13 @@ form.row(
)
button.btn.btn-sm.btn-success.affiliations-table-inline-action(
disabled
type="button"
) #{translate("make_primary")}
button.btn.btn-sm.btn-success.affiliations-table-inline-action(
tooltip=translate("make_email_primary_description")
ng-if="!userEmail.default && (userEmail.confirmedAt && !ui.isMakingRequest)"
ng-click="setDefaultUserEmail(userEmail)"
type="button"
) #{translate("make_primary")}
|  
button.btn.btn-sm.btn-danger.affiliations-table-inline-action(
@ -91,6 +94,7 @@ form.row(
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")}
@ -110,7 +114,11 @@ form.row(
| !{translate("doing_this_allow_log_in_through_institution")} 
+aboutInstitutionLink()
td.with-border.affiliations-table-inline-actions(ng-if="!userEmail.samlProviderId && !institutionAlreadyLinked(userEmail)")
button.btn-sm.btn.btn-info(ng-click="linkInstitutionAcct(userEmail.email, userEmail.affiliation.institution.id)" ng-disabled="ui.isMakingRequest")
button.btn-sm.btn.btn-info(
ng-click="linkInstitutionAcct(userEmail.email, userEmail.affiliation.institution.id)"
ng-disabled="ui.isMakingRequest"
type="button"
)
| #{translate("link_accounts")}
tr.affiliations-table-highlighted-row(
ng-if="!ui.showAddEmailUI && !ui.isMakingRequest"
@ -146,7 +154,11 @@ form.row(
p !{translate("to_add_email_accounts_need_to_be_linked", {institutionName: "{{newAffiliation.university.name}}"})}
p !{translate("doing_this_will_verify_affiliation_and_allow_log_in", {institutionName: "{{newAffiliation.university.name}}"})} 
+aboutInstitutionLink()
button.btn-sm.btn.btn-primary.btn-link-accounts(ng-click="linkInstitutionAcct(newAffiliation.email, newAffiliation.university.id)" ng-disabled="ui.isMakingRequest")
button.btn-sm.btn.btn-primary.btn-link-accounts(
ng-click="linkInstitutionAcct(newAffiliation.email, newAffiliation.university.id)"
ng-disabled="ui.isMakingRequest"
type="button"
)
| #{translate("link_accounts_and_add_email")}
td(
ng-if="shouldShowRolesAndAddEmailButton()"