From 587700771c867e48dccf0d19a4c38f3006e82875 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 29 Jul 2015 10:31:22 +0530 Subject: [PATCH] Minor Fix for CRM-16915 --- CRM/UF/Page/ProfileEditor.php | 3 ++- js/jquery/jquery.crmProfileSelector.js | 3 ++- js/model/crm.uf.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/UF/Page/ProfileEditor.php b/CRM/UF/Page/ProfileEditor.php index a7bd90bb46..56a5ec0a29 100644 --- a/CRM/UF/Page/ProfileEditor.php +++ b/CRM/UF/Page/ProfileEditor.php @@ -23,8 +23,9 @@ class CRM_UF_Page_ProfileEditor extends CRM_Core_Page { $ufGroups = civicrm_api3('UFGroup', 'get', array( 'sequential' => 1, 'is_active' => 1, - 'rowCount' => 1000, // FIXME + 'options' => array('limit' => 0), )); + //CRM-16915 - insert 'module' param for the profile used by CiviEvent. if (CRM_Core_Permission::check('manage event profiles') && !CRM_Core_Permission::check('administer CiviCRM')) { foreach ($ufGroups['values'] as $key => $value) { $ufJoin = CRM_Core_BAO_UFGroup::getUFJoinRecord($value['id']); diff --git a/js/jquery/jquery.crmProfileSelector.js b/js/jquery/jquery.crmProfileSelector.js index ab6d7f55c4..bb09f43351 100644 --- a/js/jquery/jquery.crmProfileSelector.js +++ b/js/jquery/jquery.crmProfileSelector.js @@ -33,7 +33,8 @@ if (options.groupTypeFilter) { matchingUfGroups = ufGroupCollection.subcollection({ filter: function(ufGroupModel) { - if(!$.isEmptyObject(options.usedByFilter)) { + //CRM-16915 - filter with module used by the profile + if (!$.isEmptyObject(options.usedByFilter)) { usedByFilter = options.usedByFilter; } return ufGroupModel.checkGroupType(options.groupTypeFilter, options.allowAllSubtypes, usedByFilter); diff --git a/js/model/crm.uf.js b/js/model/crm.uf.js index d275f116d6..0cb09999a7 100644 --- a/js/model/crm.uf.js +++ b/js/model/crm.uf.js @@ -719,10 +719,10 @@ } }); + // CRM-16915 - filter with usedBy module if specified. if (usedByFilter && this.get('module') != usedByFilter) { allMatched = false; } - //CRM-15427 allow all subtypes if (!$.isEmptyObject(validTypes.subTypes) && !allowAllSubtypes) { // Every actual.subType is a valid.subType -- 2.25.1