X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPrice%2FPage%2FOption.php;h=78a0bb7c59b7bc54ddc7b850f038c31f7810971e;hb=79ebec7bda156aaa375c673d4799bb374f2ee1dd;hp=8662d8c4ef571715d90a3e793cfd51003a2466bd;hpb=b5e8537ad99104f37a433de51d5d2abcebb5977c;p=civicrm-core.git diff --git a/CRM/Price/Page/Option.php b/CRM/Price/Page/Option.php index 8662d8c4ef..78a0bb7c59 100644 --- a/CRM/Price/Page/Option.php +++ b/CRM/Price/Page/Option.php @@ -1,9 +1,9 @@ array( 'name' => ts('Disable'), - 'extra' => 'onclick = "enableDisable( %%oid%%,\'' . 'CRM_Price_BAO_PriceFieldValue' . '\',\'' . 'enable-disable' . '\' );"', - 'ref' => 'disable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Disable Price Option'), ), CRM_Core_Action::ENABLE => array( 'name' => ts('Enable'), - 'extra' => 'onclick = "enableDisable( %%oid%%,\'' . 'CRM_Price_BAO_PriceFieldValue' . '\',\'' . 'disable-enable' . '\' );"', - 'ref' => 'enable-action', + 'ref' => 'crm-enable-disable', 'title' => ts('Enable Price Option'), ), CRM_Core_Action::DELETE => array( @@ -135,7 +135,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { $financialType = CRM_Contribute_PseudoConstant::financialType(); foreach ($customOption as $id => $values) { $action = array_sum(array_keys($this->actionLinks())); - if( CRM_Utils_Array::value('financial_type_id', $values)){ + if (!empty($values['financial_type_id'])){ $customOption[$id]['financial_type_id'] = $financialType[$values['financial_type_id']]; } // update enable/disable links depending on price_field properties. @@ -150,7 +150,7 @@ class CRM_Price_Page_Option extends CRM_Core_Page { $action -= CRM_Core_Action::DISABLE; } } - if (CRM_Utils_Array::value('is_default', $customOption[$id])) { + if (!empty($customOption[$id]['is_default'])) { $customOption[$id]['is_default'] = ''; } else {