Commit ab9eca19 authored by colemanw's avatar colemanw

Fix broken case activity date filter

parent 3121b783
......@@ -48,8 +48,9 @@ class CRM_Activity_Page_AJAX {
'status_id' => 'Integer',
'activity_deleted' => 'Boolean',
'activity_type_id' => 'Integer',
'activity_date_low' => 'Date',
'activity_date_high' => 'Date',
// "Date" validation fails because it expects only numbers with no hyphens
'activity_date_low' => 'Alphanumeric',
'activity_date_high' => 'Alphanumeric',
);
$params = CRM_Core_Page_AJAX::defaultSortAndPagerParams();
......
......@@ -483,9 +483,9 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
$activityStatus = CRM_Core_PseudoConstant::activityStatus();
$form->add('select', 'status_id', ts('Status'), array("" => ts(' - any status - ')) + $activityStatus, FALSE, array('id' => 'status_id_' . $form->_caseID));
// activity dates
$form->addDate('activity_date_low_' . $form->_caseID, ts('Activity Dates - From'), FALSE, array('formatType' => 'searchDate'));
$form->addDate('activity_date_high_' . $form->_caseID, ts('To'), FALSE, array('formatType' => 'searchDate'));
// activity date search filters
$form->add('datepicker', 'activity_date_low_' . $form->_caseID, ts('Activity Dates - From'), [], FALSE, ['time' => FALSE]);
$form->add('datepicker', 'activity_date_high_' . $form->_caseID, ts('To'), [], FALSE, ['time' => FALSE]);
if (CRM_Core_Permission::check('administer CiviCRM')) {
$form->add('checkbox', 'activity_deleted', ts('Deleted Activities'), '', FALSE, array('id' => 'activity_deleted_' . $form->_caseID));
......
......@@ -50,12 +50,12 @@
<td class="crm-case-caseview-form-block-activity_date_low">
{assign var=activitylow value=activity_date_low_$caseID}
{$form.$activitylow.label}<br />
{include file="CRM/common/jcalendar.tpl" elementName=$activitylow}
{$form.$activitylow.html}
</td>
<td class="crm-case-caseview-form-block-activity_date_high">
{assign var=activityhigh value=activity_date_high_$caseID}
{$form.$activityhigh.label}<br />
{include file="CRM/common/jcalendar.tpl" elementName=$activityhigh}
{$form.$activityhigh.html}
</td>
<td class="crm-case-caseview-form-block-activity_type_filter_id">
{$form.activity_type_filter_id.label}<br />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment