From: Coleman Watts Date: Sun, 15 Mar 2015 03:04:45 +0000 (-0400) Subject: Api explorer - limit multiselect to certain actions X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5bd06c360595f8e8dd5eda5b3df312969cdf5664;p=civicrm-core.git Api explorer - limit multiselect to certain actions --- diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 4f311128b3..8c7a666a31 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -23,6 +23,9 @@ // Actions that don't support fancy operators NO_OPERATORS = ['create', 'update', 'delete', 'setvalue', 'getoptions', 'getactions', 'getfields'], + // Actions that don't support multiple values + NO_MULTI = ['delete', 'getoptions', 'getactions', 'getfields'], + // Operators with special properties BOOL = ['IS NULL', 'IS NOT NULL'], TEXT = ['LIKE', 'NOT LIKE'], @@ -266,7 +269,7 @@ * @returns boolean */ function isMultiSelect(fieldName, operator) { - if (isYesNo(fieldName)) { + if (isYesNo(fieldName) || _.includes(NO_MULTI, action)) { return false; } if (_.includes(MULTI, operator)) {