}
$contactID = $row['civicrm_contact_id'];
return "<div id=contact-{$contactID} class='crm-entity'>
- <span class='crm-editable crmf-nick_name crm-editable-enabled' data-action='create'>
+ <span class='crm-editable crmf-nick_name crm-editable-enabled'>
" . $value . "</span></div>";
}
}
// Report deprecations.
$deprecated = _civicrm_api3_deprecation_check($entity, $result);
- // The "setvalue" action is deprecated but still in use, so report it only on "getactions".
- if (!is_string($deprecated) && $action == 'getactions') {
+ // Always report "setvalue" action as deprecated.
+ if (!is_string($deprecated) && ($action == 'getactions' || $action == 'setvalue')) {
$deprecated = ((array) $deprecated) + array('setvalue' => 'The "setvalue" action is deprecated. Use "create" with an id instead.');
}
// Always report "update" action as deprecated.
$row = this.first().closest('.crm-entity');
ret.entity = $row.data('entity') || $row[0].id.split('-')[0];
ret.id = $row.data('id') || $row[0].id.split('-')[1];
- ret.action = $row.data('action') || 'setvalue';
+ ret.action = $row.data('action') || 'create';
if (!ret.entity || !ret.id) {
return false;
function save() {
$row.closest('table').block();
- CRM.api3(info.entity, info.action, {id: info.id, field: 'is_active', value: enabled ? 0 : 1}, {success: successMsg}).done(refresh);
+ CRM.api3(info.entity, info.action, {id: info.id, is_active: enabled ? 0 : 1}, {success: successMsg}).done(refresh);
}
function checkResponse(e, response) {