Merge pull request #17487 from eileenmcnaughton/date
[civicrm-core.git] / templates / CRM / Admin / Form / PaymentProcessor.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* This template is used for adding/configuring Payment Processors used by a particular site/domain. *}
11 <h3>{if $action eq 1}{ts}New Payment Processor{/ts}{elseif $action eq 2}{ts}Edit Payment Processor{/ts}{else}{ts}Delete Payment Processor{/ts}{/if}</h3>
12 <div class="crm-block crm-form-block crm-paymentProcessor-form-block">
13 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
14
15 {if $action eq 8}
16 <div class="messages status no-popup">
17 <div class="icon inform-icon"></div>
18 {$deleteMessage|escape}
19 </div>
20 {else}
21 <table class="form-layout-compressed">
22 {* This works for the fields managed from the EntityFields trait - see RelationshipType.tpl for end goal in this tpl *}
23 {foreach from=$entityFields item=fieldSpec}
24 {assign var=fieldName value=$fieldSpec.name}
25 <tr class="crm-{$entityInClassFormat}-form-block-{$fieldName}">
26 {include file="CRM/Core/Form/Field.tpl"}
27 </tr>
28 {/foreach}
29
30 <tr class="crm-paymentProcessor-form-block-financial_account">
31 <td class="label">{$form.financial_account_id.label}</td>
32 <td>
33 {if $financialAccount}
34 {$form.financial_account_id.html}
35 {else}
36 {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialAccount' q="reset=1"}{/capture}
37 {ts 1=$ftUrl}There are no financial accounts configured with Financial Account Type 'Asset' Type. <a href='%1'>Click here</a> if you want to configure financial accounts for your site.{/ts}
38 {/if}
39 </td>
40 </tr>
41 <tr class="crm-paymentProcessor-form-block-payment-instrument-id">
42 <td class="label">{$form.payment_instrument_id.label}</td><td>{$form.payment_instrument_id.html}</td>
43 </tr>
44 <tr class="crm-paymentProcessor-form-block-is_active">
45 <td></td><td>{$form.is_active.html}&nbsp;{$form.is_active.label}</td>
46 </tr>
47 <tr class="crm-paymentProcessor-form-block-is_default">
48 <td></td><td>{$form.is_default.html}&nbsp;{$form.is_default.label}</td>
49 </tr>
50 <tr class="crm-paymentProcessor-form-block-accept_credit_cards">
51 <td class="label">{$form.accept_credit_cards.label}</td><td>{$form.accept_credit_cards.html}<br />
52 <span class="description">{ts}Select Credit Card Types that this payment processor can accept{/ts}</span></td>
53 </tr>
54 </table>
55 <fieldset>
56 <legend>{ts}Processor Details for Live Payments{/ts}</legend>
57 <table class="form-layout-compressed">
58 <tr class="crm-paymentProcessor-form-block-user_name">
59 <td class="label">{$form.user_name.label}</td><td>{$form.user_name.html} {help id=$ppTypeName|cat:'-live-user-name' title=$form.user_name.label}</td>
60 </tr>
61 {if $form.password}
62 <tr class="crm-paymentProcessor-form-block-password">
63 <td class="label">{$form.password.label}</td><td>{$form.password.html} {help id=$ppTypeName|cat:'-live-password' title=$form.password.label}</td>
64 </tr>
65 {/if}
66 {if $form.signature}
67 <tr class="crm-paymentProcessor-form-block-signature">
68 <td class="label">{$form.signature.label}</td><td>{$form.signature.html} {help id=$ppTypeName|cat:'-live-signature' title=$form.signature.label}</td>
69 </tr>
70 {/if}
71 {if $form.subject}
72 <tr class="crm-paymentProcessor-form-block-subject">
73 <td class="label">{$form.subject.label}</td><td>{$form.subject.html} {help id=$ppTypeName|cat:'-live-subject' title=$form.subject.label}</td>
74 </tr>
75 {/if}
76 <tr class="crm-paymentProcessor-form-block-url_site">
77 <td class="label">{$form.url_site.label}</td><td>{$form.url_site.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-site' title=$form.url_site.label}</td>
78 </tr>
79 {if $form.url_api}
80 <tr class="crm-paymentProcessor-form-block-url_api">
81 <td class="label">{$form.url_api.label}</td><td>{$form.url_api.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-api' title=$form.url_api.label}</td>
82 </tr>
83 {/if}
84 {if $is_recur}
85 <tr class="crm-paymentProcessor-form-block-url_recur">
86 <td class="label">{$form.url_recur.label}</td><td>{$form.url_recur.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-recur' title=$form.url_recur.label}</td>
87 </tr>
88 {/if}
89 {if $form.url_button}
90 <tr class="crm-paymentProcessor-form-block-url_button">
91 <td class="label">{$form.url_button.label}</td><td>{$form.url_button.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-live-url-button' title=$form.url_button.label}</td>
92 </tr>
93 {/if}
94 </table>
95 </fieldset>
96
97 <fieldset>
98 <legend>{ts}Processor Details for Test Payments{/ts}</legend>
99 <table class="form-layout-compressed">
100 <tr class="crm-paymentProcessor-form-block-test_user_name">
101 <td class="label">{$form.test_user_name.label}</td><td>{$form.test_user_name.html} {help id=$ppTypeName|cat:'-test-user-name' title=$form.test_user_name.label}</td></tr>
102 {if $form.test_password}
103 <tr class="crm-paymentProcessor-form-block-test_password">
104 <td class="label">{$form.test_password.label}</td><td>{$form.test_password.html} {help id=$ppTypeName|cat:'-test-password' title=$form.test_password.label}</td>
105 </tr>
106 {/if}
107 {if $form.test_signature}
108 <tr class="crm-paymentProcessor-form-block-test_signature">
109 <td class="label">{$form.test_signature.label}</td><td>{$form.test_signature.html} {help id=$ppTypeName|cat:'-test-signature' title=$form.test_signature.label}</td>
110 </tr>
111 {/if}
112 {if $form.test_subject}
113 <tr class="crm-paymentProcessor-form-block-test_subject">
114 <td class="label">{$form.test_subject.label}</td><td>{$form.test_subject.html} {help id=$ppTypeName|cat:'-test-subject' title=$form.test_subject.label}</td>
115 </tr>
116 {/if}
117 <tr class="crm-paymentProcessor-form-block-test_url_site">
118 <td class="label">{$form.test_url_site.label}</td><td>{$form.test_url_site.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-site' title=$form.test_url_site.label}</td>
119 </tr>
120 {if $form.test_url_api}
121 <tr class="crm-paymentProcessor-form-block-test_url_api">
122 <td class="label">{$form.test_url_api.label}</td><td>{$form.test_url_api.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-api' title=$form.test_url_api.label}</td>
123 </tr>
124 {/if}
125 {if $is_recur}
126 <tr class="crm-paymentProcessor-form-block-test_url_recur">
127 <td class="label">{$form.test_url_recur.label}</td><td>{$form.test_url_recur.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-recur' title=$form.test_url_recur.label}</td>
128 </tr>
129 {/if}
130 {if $form.test_url_button}
131 <tr class="crm-paymentProcessor-form-block-test_url_button">
132 <td class="label">{$form.test_url_button.label}</td><td>{$form.test_url_button.html|crmAddClass:huge} {help id=$ppTypeName|cat:'-test-url-button' title=$form.test_url_button.label}</td>
133 </tr>
134 {/if}
135 {/if}
136 </table>
137 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
138 </fieldset>
139 </div>
140
141 {if $action eq 1 or $action eq 2}
142 <script type="text/javascript">
143 {literal}
144 function reload(refresh) {
145 var paymentProcessorType = cj("#payment_processor_type_id");
146 var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val();
147 paymentProcessorType.closest('form').attr('data-warn-changes', 'false');
148 window.location.href = url;
149 }
150 {/literal}
151 </script>
152
153 {/if}