Merge pull request #19057 from ixiam/dev/core#2173
[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 {icon icon="fa-info-circle"}{/icon}
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 {if $form.url_site}
77 <tr class="crm-paymentProcessor-form-block-url_site">
78 <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>
79 </tr>
80 {/if}
81 {if $form.url_api}
82 <tr class="crm-paymentProcessor-form-block-url_api">
83 <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>
84 </tr>
85 {/if}
86 {if $form.url_recur}
87 <tr class="crm-paymentProcessor-form-block-url_recur">
88 <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>
89 </tr>
90 {/if}
91 {if $form.url_button}
92 <tr class="crm-paymentProcessor-form-block-url_button">
93 <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>
94 </tr>
95 {/if}
96 </table>
97 </fieldset>
98
99 <fieldset>
100 <legend>{ts}Processor Details for Test Payments{/ts}</legend>
101 <table class="form-layout-compressed">
102 <tr class="crm-paymentProcessor-form-block-test_user_name">
103 <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>
104 {if $form.test_password}
105 <tr class="crm-paymentProcessor-form-block-test_password">
106 <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>
107 </tr>
108 {/if}
109 {if $form.test_signature}
110 <tr class="crm-paymentProcessor-form-block-test_signature">
111 <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>
112 </tr>
113 {/if}
114 {if $form.test_subject}
115 <tr class="crm-paymentProcessor-form-block-test_subject">
116 <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>
117 </tr>
118 {/if}
119 {if $form.test_url_site}
120 <tr class="crm-paymentProcessor-form-block-test_url_site">
121 <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>
122 </tr>
123 {/if}
124 {if $form.test_url_api}
125 <tr class="crm-paymentProcessor-form-block-test_url_api">
126 <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>
127 </tr>
128 {/if}
129 {if $form.test_url_recur}
130 <tr class="crm-paymentProcessor-form-block-test_url_recur">
131 <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>
132 </tr>
133 {/if}
134 {if $form.test_url_button}
135 <tr class="crm-paymentProcessor-form-block-test_url_button">
136 <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>
137 </tr>
138 {/if}
139 {/if}
140 </table>
141 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
142 </fieldset>
143 </div>
144
145 {if $action eq 1 or $action eq 2}
146 <script type="text/javascript">
147 {literal}
148 function reload(refresh) {
149 var paymentProcessorType = cj("#payment_processor_type_id");
150 var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val();
151 paymentProcessorType.closest('form').attr('data-warn-changes', 'false');
152 window.location.href = url;
153 }
154 {/literal}
155 </script>
156
157 {/if}