Merge pull request #12439 from mattwire/membershiptype_baotoapi
[civicrm-core.git] / templates / CRM / Contribute / Page / ContributionRecur.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
8c9251b3 5 | Copyright CiviCRM LLC (c) 2004-2018 |
6a488035
TO
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25*}
26
4d17a233 27{include file="CRM/common/enableDisableApi.tpl"}
6a488035
TO
28
29{if $action eq 4} {* when action is view *}
30 {if $recur}
abe11616
MW
31 {if $recur.is_test}
32 <div class="help">
33 <strong>{ts}This is a TEST transaction{/ts}</strong>
34 </div>
35 {/if}
6a488035
TO
36 <h3>{ts}View Recurring Payment{/ts}</h3>
37 <div class="crm-block crm-content-block crm-recurcontrib-view-block">
38 <table class="crm-info-panel">
39 <tr><td class="label">{ts}Amount{/ts}</td><td>{$recur.amount|crmMoney:$recur.currency}{if $is_test} ({ts}test{/ts}){/if}</td></tr>
40 <tr><td class="label">{ts}Frequency{/ts}</td><td>every {$recur.frequency_interval} {$recur.frequency_unit}</td></tr>
41 <tr><td class="label">{ts}Installments{/ts}</td><td>{$recur.installments}</td></tr>
42 <tr><td class="label">{ts}Status{/ts}</td><td>{$recur.contribution_status}</td></tr>
43 <tr><td class="label">{ts}Start Date{/ts}</td><td>{$recur.start_date|crmDate}</td></tr>
44 <tr><td class="label">{ts}Created Date{/ts}</td><td>{$recur.create_date|crmDate}</td></tr>
45 {if $recur.modified_date}<tr><td class="label">{ts}Modified Date{/ts}</td><td>{$recur.modified_date|crmDate}</td></tr>{/if}
46 {if $recur.cancel_date}<tr><td class="label">{ts}Cancelled Date{/ts}</td><td>{$recur.cancel_date|crmDate}</td></tr>{/if}
b0efbefd 47 {if $recur.end_date}<tr><td class="label">{ts}End Date{/ts}</td><td>{$recur.end_date|crmDate}</td></tr>{/if}
6a488035
TO
48 {if $recur.processor_id}<tr><td class="label">{ts}Processor ID{/ts}</td><td>{$recur.processor_id}</td></tr>{/if}
49 <tr><td class="label">{ts}Transaction ID{/ts}</td><td>{$recur.trxn_id}</td></tr>
50 {if $recur.invoice_id}<tr><td class="label">{ts}Invoice ID{/ts}</td><td>{$recur.invoice_id}</td></tr>{/if}
51 <tr><td class="label">{ts}Cycle Day{/ts}</td><td>{$recur.cycle_day}</td></tr>
797b807e 52 {if $recur.contribution_status_id neq 3}<tr><td class="label">{ts}Next Contribution{/ts}</td><td>{$recur.next_sched_contribution_date|crmDate}</td></tr>{/if}
6a488035 53 <tr><td class="label">{ts}Failure Count{/ts}</td><td>{$recur.failure_count}</td></tr>
797b807e 54 {if $recur.invoice_id}<tr><td class="label">{ts}Failure Retry Date{/ts}</td><td>{$recur.next_sched_contribution_date|crmDate}</td></tr>{/if}
6a488035
TO
55 <tr><td class="label">{ts}Auto Renew?{/ts}</td><td>{if $recur.auto_renew}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td></tr>
56 {if $recur.payment_processor}<tr><td class="label">{ts}Payment Processor{/ts}</td><td>{$recur.payment_processor}</td></tr>{/if}
467fe956 57 {if $recur.financial_type}<tr><td class="label">{ts}Financial Type{/ts}</td><td>{$recur.financial_type}</td></tr>{/if}
58 {if $recur.campaign}<tr><td class="label">{ts}Campaign{/ts}</td><td>{$recur.campaign}</td></tr>{/if}
fadaea59
MW
59 {if $recur.membership_id}<tr>
60 <td class="label">{ts}Membership{/ts}</td>
61 <td><a class="crm-hover-button" href='{crmURL p="civicrm/contact/view/membership" q="action=view&reset=1&cid=`$contactId`&id=`$recur.membership_id`&context=membership&selectedChild=member"}'>{$recur.membership_name}</a></td>
62 </tr>
63 {/if}
24eba103
MW
64 {include file="CRM/Custom/Page/CustomDataView.tpl"}
65
6a488035 66 </table>
97e557d7 67 <div class="crm-submit-buttons"><a class="button cancel crm-form-submit" href="{crmURL p='civicrm/contact/view' q='action=browse&selectedChild=contribute'}">{ts}Done{/ts}</a></div>
6a488035
TO
68 </div>
69 {/if}
85b68a11
CR
70
71 <script type="text/javascript">
72 var recurContribID = {$recur.id};
73 var contactID = {$contactId};
74 {literal}
75 CRM.$(function($) {
76 CRM.loadPage(
77 CRM.url(
78 'civicrm/contribute/contributionrecur-payments',
79 {
80 reset: 1,
81 id: recurContribID,
82 cid: contactID
83 },
84 'back'
85 ),
86 {
87 target : '#recurring-contribution-payments',
88 dialog : false
89 }
90 );
91 });
92 {/literal}
93 </script>
94 <div id="recurring-contribution-payments"></div>
6a488035
TO
95{/if}
96{if $recurRows}
97 {strip}
16850d34 98 <table class="selector row-highlight">
6a488035
TO
99 <tr class="columnheader">
100 <th scope="col">{ts}Amount{/ts}</th>
101 <th scope="col">{ts}Frequency{/ts}</th>
102 <th scope="col">{ts}Start Date{/ts}</th>
103 <th scope="col">{ts}Installments{/ts}</th>
104 <th scope="col">{ts}Status{/ts}</th>
9806f96d 105 <th scope="col"></th>
6a488035
TO
106 </tr>
107
108 {foreach from=$recurRows item=row}
109 {assign var=id value=$row.id}
2d221ef7 110 <tr id="contribution_recur-{$row.id}" data-action="cancel" class="crm-entity {cycle values="even-row,odd-row"}{if NOT $row.is_active} disabled{/if}">
8007a32c 111 <td>{$row.amount|crmMoney:$row.currency}{if $row.is_test} ({ts}test{/ts}){/if}</td>
6a488035
TO
112 <td>{ts}Every{/ts} {$row.frequency_interval} {$row.frequency_unit} </td>
113 <td>{$row.start_date|crmDate}</td>
114 <td>{$row.installments}</td>
115 <td>{$row.contribution_status}</td>
9806f96d 116 <td>{$row.action|replace:'xx':$row.recurId}</td>
6a488035
TO
117 </tr>
118 {/foreach}
119 </table>
120 {/strip}
121{/if}