Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21741

For in-place editing, allow data-params to be passed to CRM.api3

    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:
      Hide
      The in-place editing features described at https://docs.civicrm.org/dev/en/latest/framework/ui/#in-place-field-editing do not allow additional parameters to be passed through to the CRM.api3 call that submits the changes.
      Show
      The in-place editing features described at https://docs.civicrm.org/dev/en/latest/framework/ui/#in-place-field-editing do not allow additional parameters to be passed through to the CRM.api3 call that submits the changes.
    • 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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ayduns Aidan Saunders
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: