From 6e219d1533e69976ae6ad20a8ccc553cf7e724b0 Mon Sep 17 00:00:00 2001 From: Sunil Pawar Date: Tue, 30 Jan 2018 14:37:28 +0530 Subject: [PATCH] CRM-21665 Fix check number toggle on Edit form when context is search --- CRM/Contribute/BAO/Query.php | 7 +++++-- templates/CRM/Contribute/Form/Search/Common.tpl | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index f3e9fabf7e..a60aea1bda 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -927,8 +927,11 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { FALSE, array('class' => 'crm-select2', 'multiple' => 'multiple', 'placeholder' => ts('- any -')) ); - $form->addSelect('payment_instrument_id', - array('entity' => 'contribution', 'multiple' => 'multiple', 'label' => ts('Payment Method'), 'option_url' => NULL, 'placeholder' => ts('- any -')) + // use contribution_payment_instrument_id instead of payment_instrument_id + // Contribution Edit form (pop-up on contribution/Contact(display Result as Contribution) open on search form), + // then payment method change action not working properly because of same html ID present two time on one page + $form->addSelect('contribution_payment_instrument_id', + array('entity' => 'contribution', 'field' => 'payment_instrument_id', 'multiple' => 'multiple', 'label' => ts('Payment Method'), 'option_url' => NULL, 'placeholder' => ts('- any -')) ); $form->add('select', diff --git a/templates/CRM/Contribute/Form/Search/Common.tpl b/templates/CRM/Contribute/Form/Search/Common.tpl index 9b94d9df54..792bf2b0ae 100644 --- a/templates/CRM/Contribute/Form/Search/Common.tpl +++ b/templates/CRM/Contribute/Form/Search/Common.tpl @@ -40,8 +40,8 @@
-
- {$form.payment_instrument_id.html|crmAddClass:twenty} +
+ {$form.contribution_payment_instrument_id.html|crmAddClass:twenty}
{$form.contribution_check_number.label}
-- 2.25.1