From 6df2d404944036c56639c59e38d236803e30aa42 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 27 Mar 2015 00:22:30 +1300 Subject: [PATCH] CRM-16184 explicitly declare when to use an accordian rather than using magic --- CRM/Report/Form.php | 5 ++++- templates/CRM/Report/Form/Tabs/FieldSelection.tpl | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 5ab76ff1bf..f8c85cec35 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -1003,13 +1003,16 @@ class CRM_Report_Form extends CRM_Core_Form { if (!$groupTitle && isset($table['group_title'])) { $groupTitle = $table['group_title']; + // Having a group_title is secret code for being a custom group + // which cryptically translates to needing an accordian. + // here we make that explicit. + $colGroups[$tableName]['use_accordian_for_field_selection'] = TRUE; } $colGroups[$tableName]['fields'][$fieldName] = CRM_Utils_Array::value('title', $field); if ($groupTitle && empty($colGroups[$tableName]['group_title'])) { $colGroups[$tableName]['group_title'] = $groupTitle; } - $options[$fieldName] = CRM_Utils_Array::value('title', $field); } } diff --git a/templates/CRM/Report/Form/Tabs/FieldSelection.tpl b/templates/CRM/Report/Form/Tabs/FieldSelection.tpl index 4775750252..805caffe22 100644 --- a/templates/CRM/Report/Form/Tabs/FieldSelection.tpl +++ b/templates/CRM/Report/Form/Tabs/FieldSelection.tpl @@ -28,7 +28,7 @@ {foreach from=$colGroups item=grpFields key=dnc} {assign var="count" value="0"} {* Wrap custom field sets in collapsed accordion pane. *} - {if $grpFields.group_title} + {if $grpFields.use_accordian_for_field_selection} {/if} -- 2.25.1