Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.29
-
Fix Version/s: 4.7.31
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:Developer Doc
-
Funding Source:Contributed Code
-
Verified?:No
-
Overview:This is a feature for developers that allows in-place editing to be used more flexibly.
-
How it works currently:
-
How it should work:A new data property allows a json_encoded array of parameters to be passed to the API call.
-
Acceptance Criteria:For a field configured for in-place editing, adding a 'data-params' property should result in the value being passed to the API call. If 'data-params' is not specified, there should be no change to current behaviour.
Description
When using in-place editing, sometimes additional parameters need to be passed to the CRM.api3. The change here is to allow data-params to be specified in the item (field) properties and passed to the api call.
For example:
{{<div class="crm-editable" data-field="field_name data-params='{"key":"value"}'> }}
Should be documented in https://docs.civicrm.org/dev/en/latest/framework/ui/#item-field-properties