minor improvements
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 8 Aug 2014 21:26:00 +0000 (02:56 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 8 Aug 2014 21:26:00 +0000 (02:56 +0530)
api/v3/ContributionRecur.php
js/jquery/jquery.crmeditable.js
templates/CRM/Contribute/Page/ContributionRecur.tpl

index ae5f7a21cc10e13683307046a1860629b6e51580..29be2811e5c0cce979c84bb3175ae448f140f2bf 100644 (file)
@@ -86,7 +86,7 @@ function civicrm_api3_contribution_recur_get($params) {
 
 function civicrm_api3_contribution_recur_cancel($params) {
   civicrm_api3_verify_one_mandatory($params, NULL, array('id'));
-  return call_user_func_array(array(_civicrm_api3_get_BAO(__FUNCTION__), 'cancelRecurContribution'), array($params['id'], CRM_Core_DAO::$_nullObject));
+  return CRM_Contribute_BAO_ContributionRecur::cancelRecurContribution($params['id'], CRM_Core_DAO::$_nullObject) ? civicrm_api3_create_success() : civicrm_api3_create_error(ts('Error while cancelling recurring contribution'));
 }
 
 /**
index 0fa6da5f9acdc58f5c731cbd2a30773630ba872d..80735b9dd6a52181bc10c052ec434b1d743c4d3a 100644 (file)
@@ -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.data('entity-action') || $row[0].id.split('-')[2] || 'setvalue';
+      ret.action = $row.attr('data-entity-action') || 'setvalue';
 
     if (!ret.entity || !ret.id) {
       return false;
index dc538eff90f06a0b61811b36a165464580c291d1..38f26e01fff0821eddc7eca9757b070cd8263e8b 100644 (file)
@@ -69,7 +69,7 @@
 
         {foreach from=$recurRows item=row}
             {assign var=id value=$row.id}
-            <tr id="contribution_recur-{$row.id}-cancel" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
+            <tr id="contribution_recur-{$row.id}" data-entity-action="cancel" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
                 <td>{$row.amount|crmMoney}{if $row.is_test} ({ts}test{/ts}){/if}</td>
                 <td>{ts}Every{/ts} {$row.frequency_interval} {$row.frequency_unit} </td>
                 <td>{$row.start_date|crmDate}</td>