From df2508b1eb8179b0013365f47970c38dfe48026d Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 1 Feb 2016 17:59:39 -0700 Subject: [PATCH] CRM-17915 - Fix datepicker in profiles --- templates/CRM/Profile/Form/Dynamic.tpl | 4 ++-- templates/CRM/Profile/Form/Search.tpl | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/templates/CRM/Profile/Form/Dynamic.tpl b/templates/CRM/Profile/Form/Dynamic.tpl index 3b74ad9ebe..6b33985267 100644 --- a/templates/CRM/Profile/Form/Dynamic.tpl +++ b/templates/CRM/Profile/Form/Dynamic.tpl @@ -171,8 +171,8 @@  {$form.$phone_ext_field.html} {/if} {else} - {if ( $field.data_type eq 'Date' or - ( ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) or ( $n eq 'activity_date_time' ) ) ) ) and $field.is_view neq 1 } + {if + ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) or ( $n eq 'activity_date_time' ) ) and $field.is_view neq 1 } {include file="CRM/common/jcalendar.tpl" elementName=$n} {else} {$form.$n.html} diff --git a/templates/CRM/Profile/Form/Search.tpl b/templates/CRM/Profile/Form/Search.tpl index cc1f6b69ae..350b38e86e 100644 --- a/templates/CRM/Profile/Form/Search.tpl +++ b/templates/CRM/Profile/Form/Search.tpl @@ -44,18 +44,10 @@ {if $field.is_search_range} {assign var=from value=$field.name|cat:'_from'} {assign var=to value=$field.name|cat:'_to'} - {if $field.data_type neq 'Date'} {$form.$from.label} {$form.$from.html}  {$form.$to.label}  {$form.$to.html} - {else} - - {$form.$from.label} - {include file="CRM/common/jcalendar.tpl" elementName=$from} -   {$form.$to.label}  {include file="CRM/common/jcalendar.tpl" elementName=$to} - - {/if} {else} @@ -73,8 +65,7 @@ {else} - {if ( $field.data_type eq 'Date' or - ( ( ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) ) ) ) } + {if ( $n eq 'birth_date' ) or ( $n eq 'deceased_date' ) } {include file="CRM/common/jcalendar.tpl" elementName=$n} {elseif $n|substr:0:5 eq 'phone'} {assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'} -- 2.25.1