diff --git a/locale/en/emails.po b/locale/en/emails.po index 2793ab7903a..4ae1bfa01ff 100644 --- a/locale/en/emails.po +++ b/locale/en/emails.po @@ -518,15 +518,21 @@ msgstr "" "submission to your ORCID profile on publication.
\n" "Visit the link to the official ORCID website, login with your profile and " "authorize the access by following the instructions.
\n" -"\n" +"" +"\"ORCIDRegister or Connect your ORCID " "iD
\n" "
\n" "
\n" +"If the button above does not work, please use this link to register or connect your ORCID iD: {$authorOrcidUrl}.\n" +"
\n" +"
\n" "More about ORCID at {$contextName}
\n" "
\n" +"
\n" "If you have any questions, please contact me.
\n" "
\n" "{$principalContactSignature}
\n" diff --git a/locale/en/user.po b/locale/en/user.po index e010449f20e..29721f1288b 100644 --- a/locale/en/user.po +++ b/locale/en/user.po @@ -635,6 +635,9 @@ msgstr "The submission will be added to your ORCID record during publication." msgid "orcid.verify.success" msgstr "Your ORCID iD has been verified and successfully associated with the submission." +msgid "orcid.verify.success.redirect" +msgstr "You will now be automatically directed back to {$contextName}." + msgid "orcid.verify.failure" msgstr "Your ORCID iD could not be verified. The link is no longer valid." @@ -766,7 +769,10 @@ msgid "orcid.field.verification.request" msgstr "Request verification" msgid "orcid.field.verification.requested" -msgstr "Verification requested!" +msgstr "ORCID Verification has been requested!" + +msgid "orcid.field.verification.resendRequest" +msgstr "Resend Verification Email" msgid "orcid.field.authorEmailModal.title" msgstr "Request ORCID verification" diff --git a/pages/orcid/OrcidHandler.php b/pages/orcid/OrcidHandler.php index a9f96035cbc..ab16bf31679 100644 --- a/pages/orcid/OrcidHandler.php +++ b/pages/orcid/OrcidHandler.php @@ -83,6 +83,7 @@ public function verify(array $args, Request $request): void 'sendSubmission' => false, 'sendSubmissionSuccess' => false, 'denied' => false, + 'contextName' => $request->getContext()->getName($request->getContext()->getPrimaryLocale()), ]); // Get the author diff --git a/styles/index.less b/styles/index.less index fc77afae6c5..54e9ba2adc2 100644 --- a/styles/index.less +++ b/styles/index.less @@ -45,6 +45,9 @@ // Right-to-left styles @import "lib/pkp/styles/rtl.less"; +// Orcid styles +@import "lib/pkp/styles/orcid.less"; + /** * Legacy styles needing refactoring */ diff --git a/styles/orcid.less b/styles/orcid.less index fbc9b794419..7ca00a343b8 100755 --- a/styles/orcid.less +++ b/styles/orcid.less @@ -8,7 +8,7 @@ .orcid_icon { display: inline-block; - margin-right: 0.25em; + margin-right: 0.5em; width: 24px; height: 24px; vertical-align: middle; diff --git a/templates/form/orcidProfile.tpl b/templates/form/orcidProfile.tpl index 17fff7874a7..3d700435ebd 100644 --- a/templates/form/orcidProfile.tpl +++ b/templates/form/orcidProfile.tpl @@ -12,32 +12,21 @@ {capture name=orcidButton assign=orcidButton} - {translate key='orcid.about.title'} + {translate key='orcid.about.title'} {/capture} {capture name=orcidLink assign=orcidLink} {if $orcidAuthenticated} - {$orcidIcon}{$orcid} - + {$orcidIcon}{$orcid} {else} - {$orcid} {$orcidButton} + {$orcidButton} {/if} {/capture} @@ -79,3 +68,8 @@ {$orcidButton} {/if} + diff --git a/templates/frontend/pages/orcidVerify.tpl b/templates/frontend/pages/orcidVerify.tpl index 4200509355b..a3e8d951207 100644 --- a/templates/frontend/pages/orcidVerify.tpl +++ b/templates/frontend/pages/orcidVerify.tpl @@ -36,6 +36,9 @@ {elseif $submissionNotPublished} {translate key="orcid.verify.sendSubmissionToOrcid.notpublished"} {/if} + + {translate key="orcid.verify.success.redirect" contextName=$contextName} + {else}
{if $orcidAPIError} @@ -59,3 +62,11 @@
{include file="frontend/components/footer.tpl"} + +{if $verifySuccess} + +{/if} diff --git a/templates/user/identityForm.tpl b/templates/user/identityForm.tpl index b36f9c42946..5e838668f9e 100644 --- a/templates/user/identityForm.tpl +++ b/templates/user/identityForm.tpl @@ -51,16 +51,25 @@ {/fbvFormSection} {if $orcidEnabled} + +
{* FIXME: The form element is still required for "connect ORCID" functionality to work. *} - {fbvFormSection} - {fbvElement type="text" label="user.orcid" name="orcid" id="orcid" value=$orcid maxlength="46"} + {fbvFormSection } + {fbvElement type="text" label="user.orcid" name="orcid" id="orcid" value=$orcid maxlength="46"} - {include file="form/orcidProfile.tpl"} - {if $orcid && $orcidAuthenticated} - {include file="linkAction/buttonConfirmationLinkAction.tpl" titleIcon="modal_delete" buttonSelector="#deleteOrcidButton" dialogText="orcid.field.deleteOrcidModal.message"} - {fbvElement type="button" id="deleteOrcidButton" label="common.delete" class="pkp_button pkp_button_offset"} - {/if} + {include file="form/orcidProfile.tpl"} + {if $orcid && $orcidAuthenticated} + {include file="linkAction/buttonConfirmationLinkAction.tpl" titleIcon="modal_delete" buttonSelector="#deleteOrcidButton" dialogText="orcid.field.deleteOrcidModal.message"} +{* {fbvElement type="button" label="common.delete" class="pkp_button pkp_button_offset"}*} + + {/if} {/fbvFormSection} +
+ {/if}