CRM-19405 - Fix custom date fields on batch profiles
authorColeman Watts <coleman@civicrm.org>
Sun, 25 Sep 2016 20:43:37 +0000 (16:43 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 26 Sep 2016 14:24:00 +0000 (10:24 -0400)
templates/CRM/Activity/Form/Task/Batch.tpl
templates/CRM/Batch/Form/Entry.tpl
templates/CRM/Campaign/Form/Task/Interview.tpl
templates/CRM/Contribute/Form/Task/Batch.tpl
templates/CRM/Event/Form/Task/Batch.tpl

index b87f90c921334caaecb57fbf2603215b7983c68f..cb8d4fd752bdd2e1a163d15e5480d40d5460f457 100644 (file)
@@ -48,7 +48,7 @@
         {/foreach}
                 {foreach from=$fields item=field key=fieldName}
                 {assign var=n value=$field.name}
-                {if ( $fields.$n.data_type eq 'Date') or (  $fields.$n.name eq 'activity_date_time' ) }
+                {if $fields.$n.name eq 'activity_date_time' }
                 <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$activityId batchUpdate=1}</td>
                 {else}
                    <td class="compressed">{$form.field.$activityId.$n.html}</td>
index 19f31e7ce8a849666e0d6474a7f2134cd5e03ec1..9e41952cf94d39f9a8dc8da807d8e920467cd797 100644 (file)
@@ -93,7 +93,7 @@
         {/if}
         {foreach from=$fields item=field key=fieldName}
           {assign var=n value=$field.name}
-          {if ( $fields.$n.data_type eq 'Date') or ( in_array( $n, array( 'thankyou_date', 'cancel_date', 'receipt_date', 'receive_date', 'join_date', 'membership_start_date', 'membership_end_date' ) ) ) }
+          {if in_array( $n, array( 'thankyou_date', 'cancel_date', 'receipt_date', 'receive_date', 'join_date', 'membership_start_date', 'membership_end_date' ) ) }
             <div class="compressed crm-grid-cell">
               <span class="crm-batch-{$n}-{$rowNumber}">
                 {include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$rowNumber batchUpdate=1}
index 5dc1343295b22a3bc928414f8f8d443d9147c3ff..9e81ae503561339889161179c6320d4c50e6e42b 100644 (file)
                 {continue}
               {/if}
               <td class="compressed {$field.data_type} {$fieldName}">
-                {if ( ($field.data_type eq 'Date') or
-                ( $fieldName eq 'thankyou_date' ) or ( $fieldName eq 'cancel_date' ) or ( $fieldName eq 'receipt_date' ) or (  $fieldName eq 'activity_date_time') ) and $field.is_view neq 1 }
+                {if ( ( $fieldName eq 'thankyou_date' ) or ( $fieldName eq 'cancel_date' ) or ( $fieldName eq 'receipt_date' ) or (  $fieldName eq 'activity_date_time') ) and $field.is_view neq 1 }
                 {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$voterId batchUpdate=1}
                 {elseif $fieldName|substr:0:5 eq 'phone'}
                   {assign var="phone_ext_field" value=$fieldName|replace:'phone':'phone_ext'}
index 51ac6a09961cf1b585032e3733dd2288fd1ef54f..a3886b5bf337e11eacc1b8cfccfb62e0feb0ba99 100644 (file)
@@ -48,7 +48,7 @@
 
               {foreach from=$fields item=field key=fieldName}
                 {assign var=n value=$field.name}
-                {if ( $fields.$n.data_type eq 'Date') or ( $n eq 'thankyou_date' ) or ( $n eq 'cancel_date' ) or ( $n eq 'receipt_date' ) or ( $n eq 'receive_date' )}
+                {if ( $n eq 'thankyou_date' ) or ( $n eq 'cancel_date' ) or ( $n eq 'receipt_date' ) or ( $n eq 'receive_date' )}
                    <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$cid batchUpdate=1}</td>
                 {else}
                    <td class="compressed">{$form.field.$cid.$n.html}</td>
index 85c2d169c4c55e2fbaf31d4e5e3a20f73333cb3c..313cceb98cca0cd916bc0c3cbbbb971af9601a3c 100644 (file)
@@ -63,7 +63,7 @@
               <td class="crm-event-title">{$details.$pid.title}</td>
               {foreach from=$fields item=field key=fieldName}
                 {assign var=n value=$field.name}
-                {if ( $fields.$n.data_type eq 'Date') or ( $n eq 'participant_register_date' ) }
+                {if ( $n eq 'participant_register_date' ) }
                    <td class="compressed">{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1}</td>
                 {else}
                   <td class="compressed">{$form.field.$pid.$n.html}</td>