Skip to content

Commit

Permalink
pkp#229 OrcidProfilePlugin-705
Browse files Browse the repository at this point in the history
  • Loading branch information
withanage committed Jan 29, 2023
1 parent 8ddadd6 commit 7038a4a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions OrcidProfilePlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
use APP\plugins\generic\orcidProfile\mailables\OrcidRequestAuthorAuthorization;
use APP\template\TemplateManager;
use Illuminate\Support\Facades\Mail;
use PKP\components\forms\FieldOptions;
use PKP\config\Config;
use PKP\core\JSONMessage;
use PKP\linkAction\LinkAction;
Expand Down Expand Up @@ -192,6 +193,32 @@ public function register($category, $path, $mainContextId = null)
return $success;
}

public function addOrcidFormFields($hookName, $form)

{

if (!$form instanceof PKP\components\forms\publication\ContributorForm) return Hook::CONTINUE;
$form->addField(new FieldOptions('requestAuthorization', [
'label' => __('plugins.generic.orcidProfile.displayName'),
'options' => [
[
'value' => true,
'label' => __('plugins.generic.orcidProfile.author.requestAuthorization')
]
]
]));
$form->addField(new FieldOptions('deleteORCID', [
'label' => __('plugins.generic.orcidProfile.displayName'),
'options' => [
[
'value' => true,
'label' => __('plugins.generic.orcidProfile.author.deleteORCID')
]
]
]));
return Hook::CONTINUE;
}


/**
* @param $hookName
Expand Down

0 comments on commit 7038a4a

Please sign in to comment.