forked from pkp/pkp-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkp#5717 Add queued payment action to accept decision and move action…
… validation to decision type
- Loading branch information
Showing
12 changed files
with
240 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
classes/components/forms/decision/RecommendDiscussionForm.inc.php
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
classes/components/forms/decision/RequestPaymentDecisionForm.inc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
/** | ||
* @file classes/components/form/decision/RequestPaymentDecisionForm.inc.php | ||
* | ||
* Copyright (c) 2014-2021 Simon Fraser University | ||
* Copyright (c) 2000-2021 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class RequestPaymentDecisionForm | ||
* @ingroup classes_controllers_form | ||
* | ||
* @brief A form to request or waive an APC payment when making an editorial decision | ||
*/ | ||
|
||
namespace PKP\components\forms\decision; | ||
|
||
use PKP\components\forms\FieldOptions; | ||
use PKP\components\forms\FormComponent; | ||
use PKP\context\Context; | ||
|
||
define('FORM_REQUEST_PAYMENT_DECISION', 'requestPaymentDecision'); | ||
|
||
class RequestPaymentDecisionForm extends FormComponent | ||
{ | ||
/** @copydoc FormComponent::$id */ | ||
public $id = FORM_REQUEST_PAYMENT_DECISION; | ||
|
||
/** @copydoc FormComponent::$action */ | ||
public $action = FormComponent::ACTION_EMIT; | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public function __construct(Context $context) | ||
{ | ||
$this->addField(new FieldOptions('requestPayment', [ | ||
'label' => __('common.payment'), | ||
'type' => 'radio', | ||
'options' => [ | ||
[ | ||
'value' => true, | ||
'label' => __( | ||
'payment.requestPublicationFee', | ||
['feeAmount' => $context->getData('publicationFee') . ' ' . $context->getData('currency')] | ||
), | ||
], | ||
[ | ||
'value' => false, | ||
'label' => __('payment.waive'), | ||
], | ||
], | ||
'value' => true, | ||
'groupId' => 'default', | ||
])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.