Minor Fix for CRM-16915
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 29 Jul 2015 05:01:22 +0000 (10:31 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 29 Jul 2015 05:01:22 +0000 (10:31 +0530)
CRM/UF/Page/ProfileEditor.php
js/jquery/jquery.crmProfileSelector.js
js/model/crm.uf.js

index a7bd90bb468567ae13c799881d4bcb894c13bd8c..56a5ec0a29ad2b839d1f05762d008191cd3c6bb7 100644 (file)
@@ -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']);
index ab6d7f55c44910309b66c7457dffa51c796c3946..bb09f4335139770429cc6f2bc9daf0945cefc23c 100644 (file)
@@ -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);
index d275f116d6073a414b0660871142861e865e0d1e..0cb09999a7e47362001e6649d852f6711753309e 100644 (file)
         }
       });
 
+      // 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