From: Coleman Watts Date: Sat, 23 Jan 2016 03:23:25 +0000 (-0500) Subject: CRM-17857 - Update api explorer to exclude participant joins X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=39eceabab785c072483dabb05f2bb27092c9f0e4;p=civicrm-core.git CRM-17857 - Update api explorer to exclude participant joins --- diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 4c670e43bc..3696c7ce61 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -20,6 +20,10 @@ docCodeTpl = _.template($('#doc-code-tpl').html()), joinTpl = _.template($('#join-tpl').html()), + // The following apis do not support the syntax for joins + // FIXME: the solution is to convert these apis to use _civicrm_api3_basic_get + NO_JOINS = ['Contact', 'Contribution', 'Pledge', 'Participant'], + // These types of entityRef don't require any input to open // FIXME: ought to be in getfields metadata OPEN_IMMEDIATELY = ['RelationshipType', 'Event', 'Group', 'Tag'], @@ -824,7 +828,7 @@ */ function renderJoinSelector() { $('#api-join').hide(); - if (!_.includes(['Contact', 'Contribution', 'Pledge'], entity) && _.includes(['get', 'getsingle'], action)) { + if (!_.includes(NO_JOINS, entity) && _.includes(['get', 'getsingle'], action)) { var joinable = {}; (function recurse(fields, joinable, prefix, depth, entities) { _.each(fields, function(field) {