$this->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this, TRUE, NULL, $_REQUEST);
$this->assign('customGroupId', $this->_groupID);
-
+ $customRecId = CRM_Utils_Request::retrieve('customRecId', 'Positive', $this, FALSE, 1, $_REQUEST);
$subType = CRM_Contact_BAO_Contact::getContactSubType($this->_contactId, ',');
- CRM_Custom_Form_CustomData::preProcess($this, null, $subType, 1,
+ CRM_Custom_Form_CustomData::preProcess($this, null, $subType, $customRecId,
$this->_contactType, $this->_contactId);
}
*/
/**
- * This page displays custom data during inline edit
+ * This page displays custom data during inline edit
*
*/
class CRM_Contact_Page_Inline_CustomData extends CRM_Core_Page {
// get the emails for this contact
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
$cgId = CRM_Utils_Request::retrieve('groupID', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
-
+ $customRecId = CRM_Utils_Request::retrieve('customRecId', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1, $_REQUEST);
+
//custom groups Inline
$entityType = CRM_Contact_BAO_Contact::getContactType($contactId);
$entitySubType = CRM_Contact_BAO_Contact::getContactSubType($contactId);
$groupTree = &CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $contactId,
$cgId, $entitySubType
);
-
$details = CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
- $fields = array_pop($details[$cgId]);
+ //get the fields of single custom group record
+ $fields = CRM_Utils_Array::value($customRecId, $details[$cgId]);
+ $this->assign('customRecId', $customRecId);
$this->assign('contactId', $contactId);
$this->assign('customGroupId', $cgId);
$this->assign_by_ref('cd_edit', $fields);
// check logged in user permission
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
- // finally call parent
+ // finally call parent
parent::run();
}
}
-
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-<div id="custom-set-content-{$customGroupId}" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_CustomData", "groupID": "{$customGroupId}"{rdelim}'{/if}>
+<div id="custom-set-content-{$customGroupId}" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_CustomData", "groupID": "{$customGroupId}", "customRecId": "{$customRecId}"{rdelim}'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Edit{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<div class="collapsible-title">
{$cd_edit.title}
</div>
- <div class="crm-summary-block" id="custom-set-block-{$customGroupId}">
- {include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId}
+ {if $cvID eq 0}
+ {assign var='cvID' value='-1'}
+ {/if}
+ <div class="crm-summary-block" id="custom-set-block-{$customGroupId}-{$cvID}">
+ {include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId customRecId=$cvID}
</div>
</div>
{/foreach}