2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
11 <script type="text/javascript">
13 CRM.buildCustomData = function (type, subType, subName, cgCount, groupID, isMultiple, onlySubtype, cid) {
14 var dataUrl = CRM.url('civicrm/custom', {type: type}),
16 fname = '#customData',
20 dataUrl += '&subType=' + subType;
24 dataUrl += '&onlySubtype=' + onlySubtype;
28 dataUrl += '&subName=' + subName;
29 $('#customData' + subName).show();
32 $('#customData').show();
35 dataUrl += '&groupID=' + groupID;
40 dataUrl += '&groupID=' + '{$groupID}';
43 dataUrl += '&entityID=' + '{$entityID}';
46 dataUrl += '&qf=' + '{$qfKey}';
49 dataUrl += '&action=' + '{$action}';
53 dataUrl += '&cid=' + cid;
59 else if (cgCount >= 1) {
64 dataUrl += '&cgcount=' + cgCount;
68 fname = '#custom_group_' + groupID + '_' + prevCount;
69 if ($(".add-more-link-" + groupID + "-" + prevCount).length) {
70 $(".add-more-link-" + groupID + "-" + prevCount).hide();
73 $("#add-more-link-" + prevCount).hide();
76 else if (subName && subName != 'null') {
80 return CRM.loadPage(dataUrl, {target: fname});