From 3af286abf717c8206f6286f4991db8de87f8d23b Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 29 May 2015 01:41:59 +0530 Subject: [PATCH] --CRM-16187, added warning text in API explorer --- templates/CRM/Admin/Page/APIExplorer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 9f74422904..eb79dd6e67 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -720,7 +720,12 @@ $('#api-params').html(''); $('#api-params-table thead').show(); getFields(this); - buildParams(); + if ($.inArray(entity, ['EntityFinancialTrxn', 'FinancialTrxn']) > -1 + && $.inArray(action, ['delete', 'setvalue', 'replace', 'create']) > -1 + ) { + var msg = ts('Given the importance of auditability, extension developers are strongly discouraged from writing code to add, update or delete entries in the civicrm_financial_item, civicrm_entity_financial_trxn, and civicrm_financial_trxn tables. Before publishing an extension on civicrm.org that does any of this, please ask for a special bookkeeping code review for the extension.'); + CRM.alert(msg, 'warning'); + } } else { $('#api-params, #api-generated pre').empty(); $('#api-param-buttons, #api-params-table thead').hide(); -- 2.25.1