18 import(
'lib.pkp.classes.form.Form');
23 'orcidProfileAPIPath' =>
'string',
24 'orcidClientId' =>
'string',
25 'orcidClientSecret' =>
'string',
26 'sendMailToAuthorsOnPublication' =>
'bool',
27 'logLevel' =>
'string',
45 parent::__construct(
$plugin->getTemplateResource(
'settingsForm.tpl'));
47 if(!$this->plugin->isGloballyConfigured()) {
49 'plugins.generic.orcidProfile.manager.settings.orcidAPIPathRequired'));
61 $this->_data = array();
62 foreach (self::CONFIG_VARS as $configVar => $type) {
78 function fetch($request, $template =
null, $display =
false) {
80 $templateMgr->assign(
'globallyConfigured', $this->plugin->isGloballyConfigured());
81 $templateMgr->assign(
'pluginName', $this->plugin->getName());
82 return parent::fetch($request, $template, $display);
88 function execute(...$functionArgs) {
91 foreach (self::CONFIG_VARS as $configVar => $type) {
92 if ($configVar ===
'orcidProfileAPIPath') {
99 if (strpos($this->
getData(
"orcidProfileAPIPath"),
"sandbox.orcid.org") ==
true) {
100 $plugin->updateSetting(
$contextId,
"isSandBox",
true,
"bool");
103 parent::execute(...$functionArgs);