dev/core#561 - Convert grant task form to datepicker
authorColeman Watts <coleman@civicrm.org>
Thu, 17 Jan 2019 19:10:00 +0000 (14:10 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 24 Jan 2019 19:17:13 +0000 (14:17 -0500)
CRM/Grant/Form/Task/Update.php
templates/CRM/Grant/Form/Task/Update.tpl

index fa1d03a7d281fa2172a399377ea3c1dc85ab7ffd..283cde0596ec1ea629ab4e898d9632e4917c0d0c 100644 (file)
@@ -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));
index 81b14833d22a4712ce422891240209fd8e697fee..f73ffe97f9d5436efa990e318103287df164a611 100644 (file)
@@ -23,7 +23,7 @@
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{* Update Grants *}
+{* Update Grants Via Search Actions *}
 <div class="crm-block crm-form-block crm-grants-update-form-block">
     <p>{ts}Enter values for the fields you wish to update. Leave fields blank to preserve existing values.{/ts}</p>
     <table class="form-layout-compressed">
         {foreach from=$elements item=element}
             <tr class="crm-contact-custom-search-form-row-{$element}">
                 <td class="label">{$form.$element.label}</td>
-                {if $element eq 'decision_date'}
-                    <td>{include file="CRM/common/jcalendar.tpl" elementName=decision_date}<br />
-                    <span class="description">{ts}Date on which the grant decision was finalized.{/ts}</span></td>
-                {else}
-                    <td>{$form.$element.html}</td>
-                {/if}
+                <td>{$form.$element.html}</td>
             </tr>
         {/foreach}
     </table>
     <p>{ts 1=$totalSelectedGrants}Number of selected grants: %1{/ts}</p>
     <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
-</div><!-- /.crm-form-block -->
+</div>