From: Coleman Watts Date: Sat, 9 Aug 2014 12:03:57 +0000 (+0100) Subject: crmEditable - consistent treatment of action params X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2d221ef7965ff61353204bf67975edd7cc7cdaf7;p=civicrm-core.git crmEditable - consistent treatment of action params --- diff --git a/js/jquery/jquery.crmeditable.js b/js/jquery/jquery.crmeditable.js index 80735b9dd6..bb86b2f65a 100644 --- a/js/jquery/jquery.crmeditable.js +++ b/js/jquery/jquery.crmeditable.js @@ -12,7 +12,7 @@ $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.attr('data-entity-action') || 'setvalue'; + ret.action = $row.data('action') || 'setvalue'; if (!ret.entity || !ret.id) { return false; @@ -43,7 +43,7 @@ field: info.field, value: checked ? 1 : 0 }; - CRM.api(info.entity, 'setvalue', params, { + CRM.api(info.entity, info.action, params, { context: this, error: function(data) { editableSettings.error.call(this, info.entity, info.field, checked, data); @@ -122,7 +122,7 @@ var info = $i.crmEditableEntity(), params = {}, - action = $i.data('action') || 'setvalue'; + action = $i.data('action') || info.action; if (!info.field) { return false; } diff --git a/templates/CRM/Contribute/Page/ContributionRecur.tpl b/templates/CRM/Contribute/Page/ContributionRecur.tpl index 38f26e01ff..4521d91e01 100644 --- a/templates/CRM/Contribute/Page/ContributionRecur.tpl +++ b/templates/CRM/Contribute/Page/ContributionRecur.tpl @@ -69,7 +69,7 @@ {foreach from=$recurRows item=row} {assign var=id value=$row.id} - + {$row.amount|crmMoney}{if $row.is_test} ({ts}test{/ts}){/if} {ts}Every{/ts} {$row.frequency_interval} {$row.frequency_unit} {$row.start_date|crmDate}