diff --git a/checknumberpaymentmethod.php b/checknumberpaymentmethod.php index 8a02e16..dfc1c72 100644 --- a/checknumberpaymentmethod.php +++ b/checknumberpaymentmethod.php @@ -209,4 +209,15 @@ function checknumberpaymentmethod_civicrm_buildForm($formName, &$form) { $form->assign('paymentTypeLabel', ts('Check Information')); } } + if ('CRM_Financial_Form_PaymentEdit' == $formName) { + $paymentInstrumentsFromSettings = civicrm_api3('Setting', 'getvalue', [ + 'name' => 'check_payment_instrument_ids', + ]); + $paymentInstrumentsFromSettings[] = (string) CRM_Core_PseudoConstant::getKey( + 'CRM_Contribute_BAO_Contribution', + 'payment_instrument_id', + 'Check' + ); + $form->assign('paymentInstrumentsFromSettings', json_encode($paymentInstrumentsFromSettings)); + } } diff --git a/templates/CRM/Financial/Form/PaymentEditExtra.tpl b/templates/CRM/Financial/Form/PaymentEditExtra.tpl new file mode 100644 index 0000000..b5b8fec --- /dev/null +++ b/templates/CRM/Financial/Form/PaymentEditExtra.tpl @@ -0,0 +1,18 @@ +{literal} + +{/literal}