From 0249f58efc32bad9342b5da9fcc4d51474c10635 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 14 Jun 2013 16:49:01 +0200 Subject: [PATCH] CRM-12809 - Determine is_addable on server-side ---------------------------------------- * CRM-12809: Reserved CustomGroups http://issues.civicrm.org/jira/browse/CRM-12809 --- CRM/UF/Page/ProfileEditor.php | 2 +- js/view/crm.designer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/UF/Page/ProfileEditor.php b/CRM/UF/Page/ProfileEditor.php index 90f7394625..2f4fbb25a0 100644 --- a/CRM/UF/Page/ProfileEditor.php +++ b/CRM/UF/Page/ProfileEditor.php @@ -208,7 +208,7 @@ class CRM_UF_Page_ProfileEditor extends CRM_Core_Page { $sectionName = 'cg_' . $customGroup->id; $section = array( 'title' => ts('%1: %2', array(1 => $title, 2 => $customGroup->title)), - 'is_addable' => TRUE, + 'is_addable' => $customGroup->is_reserved ? FALSE : TRUE, 'custom_group_id' => $customGroup->id, 'extends_entity_column_id' => $customGroup->extends_entity_column_id, 'extends_entity_column_value' => CRM_Utils_Array::explodePadded($customGroup->extends_entity_column_value), diff --git a/js/view/crm.designer.js b/js/view/crm.designer.js index 7011f5ff51..e59c1d98e3 100644 --- a/js/view/crm.designer.js +++ b/js/view/crm.designer.js @@ -328,7 +328,7 @@ items.push({data: paletteFieldModel.getLabel(), attr: {'class': 'crm-designer-palette-field', 'data-plm-cid': paletteFieldModel.cid}}); }); } - if (section.is_addable && !section.is_reserved) { + if (section.is_addable) { items.push({data: 'placeholder', attr: {'class': 'crm-designer-palette-add', 'data-entity': ufEntityModel.get('entity_name'), 'data-section': sectionKey}}); } if (items.length > 0) { -- 2.25.1