From 217c192b21bdf3063eb92d7ef5aa581e31b4355d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 25 Sep 2016 16:43:37 -0400 Subject: [PATCH] CRM-19405 - Fix custom date fields on batch profiles --- templates/CRM/Activity/Form/Task/Batch.tpl | 2 +- templates/CRM/Batch/Form/Entry.tpl | 2 +- templates/CRM/Campaign/Form/Task/Interview.tpl | 3 +-- templates/CRM/Contribute/Form/Task/Batch.tpl | 2 +- templates/CRM/Event/Form/Task/Batch.tpl | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/templates/CRM/Activity/Form/Task/Batch.tpl b/templates/CRM/Activity/Form/Task/Batch.tpl index b87f90c921..cb8d4fd752 100644 --- a/templates/CRM/Activity/Form/Task/Batch.tpl +++ b/templates/CRM/Activity/Form/Task/Batch.tpl @@ -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' } {include file="CRM/common/jcalendar.tpl" elementName=$fieldName elementIndex=$activityId batchUpdate=1} {else} {$form.field.$activityId.$n.html} diff --git a/templates/CRM/Batch/Form/Entry.tpl b/templates/CRM/Batch/Form/Entry.tpl index 19f31e7ce8..9e41952cf9 100644 --- a/templates/CRM/Batch/Form/Entry.tpl +++ b/templates/CRM/Batch/Form/Entry.tpl @@ -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' ) ) }
{include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$rowNumber batchUpdate=1} diff --git a/templates/CRM/Campaign/Form/Task/Interview.tpl b/templates/CRM/Campaign/Form/Task/Interview.tpl index 5dc1343295..9e81ae5035 100644 --- a/templates/CRM/Campaign/Form/Task/Interview.tpl +++ b/templates/CRM/Campaign/Form/Task/Interview.tpl @@ -155,8 +155,7 @@ {continue} {/if} - {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'} diff --git a/templates/CRM/Contribute/Form/Task/Batch.tpl b/templates/CRM/Contribute/Form/Task/Batch.tpl index 51ac6a0996..a3886b5bf3 100644 --- a/templates/CRM/Contribute/Form/Task/Batch.tpl +++ b/templates/CRM/Contribute/Form/Task/Batch.tpl @@ -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' )} {include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$cid batchUpdate=1} {else} {$form.field.$cid.$n.html} diff --git a/templates/CRM/Event/Form/Task/Batch.tpl b/templates/CRM/Event/Form/Task/Batch.tpl index 85c2d169c4..313cceb98c 100644 --- a/templates/CRM/Event/Form/Task/Batch.tpl +++ b/templates/CRM/Event/Form/Task/Batch.tpl @@ -63,7 +63,7 @@ {$details.$pid.title} {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' ) } {include file="CRM/common/jcalendar.tpl" elementName=$n elementIndex=$pid batchUpdate=1} {else} {$form.field.$pid.$n.html} -- 2.25.1