Skip to content

Commit

Permalink
Merge pull request #11611 from cividesk/CRM-21665-NEW
Browse files Browse the repository at this point in the history
CRM-21665 Fix check number toggle on Edit form when context is search
  • Loading branch information
eileenmcnaughton authored Jan 30, 2018
2 parents d01e790 + 6e219d1 commit e1b9df0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CRM/Contribute/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,11 @@ public static function buildSearchForm(&$form) {
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',
Expand Down
4 changes: 2 additions & 2 deletions templates/CRM/Contribute/Form/Search/Common.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<tr>
<td>
<div class="float-left">
<label>{$form.payment_instrument_id.label}</label> <br />
{$form.payment_instrument_id.html|crmAddClass:twenty}
<label>{$form.contribution_payment_instrument_id.label}</label> <br />
{$form.contribution_payment_instrument_id.html|crmAddClass:twenty}
</div>
<div class="float-left" id="contribution_check_number_wrapper">
{$form.contribution_check_number.label} <br />
Expand Down

0 comments on commit e1b9df0

Please sign in to comment.