Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
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} | |
edc51caa | 16 | <div class="messages status no-popup"> |
34d6cec4 | 17 | {icon icon="fa-info-circle"}{/icon} |
83376469 | 18 | {$deleteMessage|escape} |
6a488035 TO |
19 | </div> |
20 | {else} | |
21 | <table class="form-layout-compressed"> | |
83376469 | 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} | |
edc51caa | 29 | |
6a488035 TO |
30 | <tr class="crm-paymentProcessor-form-block-financial_account"> |
31 | <td class="label">{$form.financial_account_id.label}</td> | |
32 | <td> | |
edc51caa | 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} | |
6a488035 TO |
38 | {/if} |
39 | </td> | |
40 | </tr> | |
b7e7f943 | 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> | |
6a488035 TO |
44 | <tr class="crm-paymentProcessor-form-block-is_active"> |
45 | <td></td><td>{$form.is_active.html} {$form.is_active.label}</td> | |
46 | </tr> | |
47 | <tr class="crm-paymentProcessor-form-block-is_default"> | |
48 | <td></td><td>{$form.is_default.html} {$form.is_default.label}</td> | |
49 | </tr> | |
cb5962bd | 50 | <tr class="crm-paymentProcessor-form-block-accept_credit_cards"> |
660ef5f6 SL |
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> | |
cb5962bd | 53 | </tr> |
6a488035 TO |
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"> | |
dab1c770 | 73 | <td class="label">{$form.subject.label}</td><td>{$form.subject.html} {help id=$ppTypeName|cat:'-live-subject' title=$form.subject.label}</td> |
6a488035 TO |
74 | </tr> |
75 | {/if} | |
2e219a96 | 76 | {if $form.url_site} |
6a488035 TO |
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> | |
2e219a96 | 80 | {/if} |
6a488035 TO |
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} | |
2e219a96 | 86 | {if $form.url_recur} |
6a488035 TO |
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} | |
edc51caa | 96 | </table> |
6a488035 TO |
97 | </fieldset> |
98 | ||
99 | <fieldset> | |
100 | <legend>{ts}Processor Details for Test Payments{/ts}</legend> | |
edc51caa | 101 | <table class="form-layout-compressed"> |
6a488035 TO |
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"> | |
dab1c770 | 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> |
6a488035 TO |
117 | </tr> |
118 | {/if} | |
2e219a96 | 119 | {if $form.test_url_site} |
6a488035 TO |
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> | |
2e219a96 | 123 | {/if} |
6a488035 TO |
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} | |
2e219a96 | 129 | {if $form.test_url_recur} |
6a488035 TO |
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> | |
edc51caa | 138 | {/if} |
139 | {/if} | |
6a488035 TO |
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} | |
39cf6c8e CW |
146 | <script type="text/javascript"> |
147 | {literal} | |
6a488035 | 148 | function reload(refresh) { |
39cf6c8e CW |
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; | |
6a488035 | 153 | } |
39cf6c8e CW |
154 | {/literal} |
155 | </script> | |
6a488035 TO |
156 | |
157 | {/if} |