From: colemanw Date: Sat, 14 Oct 2023 15:27:46 +0000 (-0400) Subject: Merge pull request #23299 from kurund/hide-disabled-financial-types X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2da3b7e30835cebbb6628486b5ee66ca1cc87a71;p=civicrm-core.git Merge pull request #23299 from kurund/hide-disabled-financial-types do not show disabled financial types in select for manage events --- 2da3b7e30835cebbb6628486b5ee66ca1cc87a71 diff --cc CRM/Event/Form/ManageEvent/Fee.php index 52eb1eb987,002daac241..4cdc3eb1b8 --- a/CRM/Event/Form/ManageEvent/Fee.php +++ b/CRM/Event/Form/ManageEvent/Fee.php @@@ -246,16 -246,17 +246,17 @@@ class CRM_Event_Form_ManageEvent_Fee ex ); // financial type - if (!CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() || - (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && CRM_Core_Permission::check('administer CiviCRM Financial Types'))) { - $this->addSelect('financial_type_id'); - } - else { - CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, CRM_Core_Action::ADD); - $this->addSelect('financial_type_id', ['context' => 'search', 'options' => $financialTypes]); + CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, CRM_Core_Action::ADD); + $financialOptions = [ + 'options' => $financialTypes, + ]; + if (!CRM_Core_Permission::check('administer CiviCRM Financial Types')) { + $financialOptions['context'] = 'search'; } + $this->addSelect('financial_type_id', $financialOptions); + // add pay later options - $this->addElement('checkbox', 'is_pay_later', ts('Enable Pay Later option?'), NULL, + $this->addElement('checkbox', 'is_pay_later', ts('Pay later option'), NULL, ['onclick' => "return showHideByValue('is_pay_later','','payLaterOptions','block','radio',false);"] ); $this->addElement('textarea', 'pay_later_text', ts('Pay Later Label'),