16 use \PKP\components\forms\FormComponent;
17 use \PKP\components\forms\FieldSelect;
18 use \PKP\components\forms\FieldOptions;
20 define(
'FORM_ACCESS',
'access');
21 define(
'SUBSCRIPTION_OPEN_ACCESS_DELAY_MIN',
'1');
22 define(
'SUBSCRIPTION_OPEN_ACCESS_DELAY_MAX',
'60');
42 $validDelayedOpenAccessDuration[] = [
'value' => 0,
'label' => __(
'common.disabled')];
44 $validDelayedOpenAccessDuration[] = [
46 'label' => __(
'manager.subscriptionPolicies.xMonths', array(
'x' => $i)),
51 'label' => __(
'manager.distribution.publishingMode'),
54 [
'value' => PUBLISHING_MODE_OPEN,
'label' => __(
'manager.distribution.publishingMode.openAccess')],
55 [
'value' => PUBLISHING_MODE_SUBSCRIPTION,
'label' => __(
'manager.distribution.publishingMode.subscription')],
56 [
'value' => PUBLISHING_MODE_NONE,
'label' => __(
'manager.distribution.publishingMode.none')],
58 'value' => $context->getData(
'publishingMode'),
60 ->addField(
new FieldSelect(
'delayedOpenAccessDuration', [
61 'label' => __(
'about.delayedOpenAccess'),
62 'options' => $validDelayedOpenAccessDuration,
63 'value' => $context->getData(
'delayedOpenAccessDuration'),
64 'showWhen' => [
'publishingMode', PUBLISHING_MODE_SUBSCRIPTION],
67 'label' => __(
'manager.setup.enableOai'),
68 'description' => __(
'manager.setup.enableOai.description'),
71 [
'value' =>
true,
'label' => __(
'common.enable')],
72 [
'value' =>
false,
'label' => __(
'common.disable')],
74 'value' => $context->getData(
'enableOai'),