CRM-21408 - Api explorer - better defaults for sequential checkbox
authorColeman Watts <coleman@civicrm.org>
Wed, 8 Nov 2017 14:40:27 +0000 (09:40 -0500)
committerColeman Watts <coleman@civicrm.org>
Wed, 8 Nov 2017 14:40:27 +0000 (09:40 -0500)
----------------------------------------
* CRM-21408: Api explorer - better defaults for sequential checkbox
  https://issues.civicrm.org/jira/browse/CRM-21408

templates/CRM/Admin/Page/APIExplorer.js

index 8b94be5d9f4860f2f81957586d4fdf490a424d44..7769e4a33eafb61dd881cc9a5be1eed768617b59 100644 (file)
     fields = [];
     joins = [];
     getFieldData = {};
+    // Sequential doesn't make sense in getsingle context, and is only a sensible default for get
+    $('label[for=sequential-checkbox]').toggle(action !== 'getsingle').find('input').prop('checked', action === 'get').change();
     // Special case for getfields
     if (action === 'getfields') {
       fields.push({