From b082b03b0bfe847aa962bdba8b995a53f26ef442 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 30 Mar 2019 07:56:00 +1100 Subject: [PATCH] Convert trxn_date field in the Update Pending Status task option from find contributions to datepicker from jcalendar --- CRM/Contribute/Form/Task/Status.php | 6 +++--- templates/CRM/Contribute/Form/Task/Status.tpl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Contribute/Form/Task/Status.php b/CRM/Contribute/Form/Task/Status.php index f32c9e489d..94bc70f1d8 100644 --- a/CRM/Contribute/Form/Task/Status.php +++ b/CRM/Contribute/Form/Task/Status.php @@ -118,7 +118,7 @@ AND co.id IN ( $contribIDs )"; $this->_rows = array(); $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Contribution'); $defaults = array(); - $now = date("m/d/Y"); + $now = date("Y-m-d"); $paidByOptions = array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::paymentInstrument(); while ($dao->fetch()) { @@ -140,8 +140,8 @@ AND co.id IN ( $contribIDs )"; $this->addRule("fee_amount_{$row['contribution_id']}", ts('Please enter a valid amount.'), 'money'); $defaults["fee_amount_{$row['contribution_id']}"] = 0.0; - $row['trxn_date'] = $this->addDate("trxn_date_{$row['contribution_id']}", FALSE, - ts('Receipt Date'), array('formatType' => 'activityDate') + $row['trxn_date'] = $this->add('datepicker', "trxn_date_{$row['contribution_id']}", [], FALSE, + ts('Receipt Date'), array('time' => FALSE) ); $defaults["trxn_date_{$row['contribution_id']}"] = $now; diff --git a/templates/CRM/Contribute/Form/Task/Status.tpl b/templates/CRM/Contribute/Form/Task/Status.tpl index 7b64079452..42baa59e8b 100644 --- a/templates/CRM/Contribute/Form/Task/Status.tpl +++ b/templates/CRM/Contribute/Form/Task/Status.tpl @@ -59,7 +59,7 @@ {assign var="element_name" value="trxn_id_"|cat:$row.contribution_id} {$form.$element_name.html|crmAddClass:eight} {assign var="element_name" value="trxn_date_"|cat:$row.contribution_id} - {include file="CRM/common/jcalendar.tpl" elementName=$element_name} + {$form.$element_name.html} {/foreach} -- 2.25.1