From 54d7f3782e0240a44527628fdb986a1c15ebacd3 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 17 Jan 2019 14:10:00 -0500 Subject: [PATCH] dev/core#561 - Convert grant task form to datepicker --- CRM/Grant/Form/Task/Update.php | 2 +- templates/CRM/Grant/Form/Task/Update.tpl | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CRM/Grant/Form/Task/Update.php b/CRM/Grant/Form/Task/Update.php index fa1d03a7d2..283cde0596 100644 --- a/CRM/Grant/Form/Task/Update.php +++ b/CRM/Grant/Form/Task/Update.php @@ -67,7 +67,7 @@ class CRM_Grant_Form_Task_Update extends CRM_Grant_Form_Task { $this->addElement('text', 'amount_granted', ts('Amount Granted')); $this->addRule('amount_granted', ts('Please enter a valid amount.'), 'money'); - $this->addDate('decision_date', ts('Grant Decision'), FALSE, array('formatType' => 'custom')); + $this->add('datepicker', 'decision_date', ts('Grant Decision'), [], FALSE, ['time' => FALSE]); $this->assign('elements', array('status_id', 'amount_granted', 'decision_date')); $this->assign('totalSelectedGrants', count($this->_grantIds)); diff --git a/templates/CRM/Grant/Form/Task/Update.tpl b/templates/CRM/Grant/Form/Task/Update.tpl index 81b14833d2..f73ffe97f9 100644 --- a/templates/CRM/Grant/Form/Task/Update.tpl +++ b/templates/CRM/Grant/Form/Task/Update.tpl @@ -23,7 +23,7 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{* Update Grants *} +{* Update Grants Via Search Actions *}

{ts}Enter values for the fields you wish to update. Leave fields blank to preserve existing values.{/ts}

@@ -31,15 +31,10 @@ {foreach from=$elements item=element} - {if $element eq 'decision_date'} - - {else} - - {/if} + {/foreach}
{$form.$element.label}{include file="CRM/common/jcalendar.tpl" elementName=decision_date}
- {ts}Date on which the grant decision was finalized.{/ts}
{$form.$element.html}{$form.$element.html}

{ts 1=$totalSelectedGrants}Number of selected grants: %1{/ts}

{include file="CRM/common/formButtons.tpl" location="bottom"}
-
+ -- 2.25.1