| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.7 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
| 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 | {* This template is used for adding/configuring Payment Processors used by a particular site/domain. *} |
| 27 | <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> |
| 28 | <div class="crm-block crm-form-block crm-paymentProcessor-form-block"> |
| 29 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div> |
| 30 | |
| 31 | {if $action eq 8} |
| 32 | <div class="messages status no-popup"> |
| 33 | <div class="icon inform-icon"></div> |
| 34 | {ts}WARNING: Deleting this Payment Processor may result in some transaction pages being rendered inactive.{/ts} {ts}Do you want to continue?{/ts} |
| 35 | </div> |
| 36 | {else} |
| 37 | <table class="form-layout-compressed"> |
| 38 | <tr class="crm-paymentProcessor-form-block-payment_processor_type"> |
| 39 | <td class="label">{$form.payment_processor_type_id.label}</td><td>{$form.payment_processor_type_id.html} {help id='proc-type'}</td> |
| 40 | </tr> |
| 41 | <tr class="crm-paymentProcessor-form-block-name"> |
| 42 | <td class="label">{$form.name.label}</td><td>{$form.name.html}</td> |
| 43 | </tr> |
| 44 | <tr class="crm-paymentProcessor-form-block-description"> |
| 45 | <td class="label">{$form.description.label}</td><td>{$form.description.html}</td> |
| 46 | </tr> |
| 47 | |
| 48 | <tr class="crm-paymentProcessor-form-block-financial_account"> |
| 49 | <td class="label">{$form.financial_account_id.label}</td> |
| 50 | <td> |
| 51 | {if $financialAccount} |
| 52 | {$form.financial_account_id.html} |
| 53 | {else} |
| 54 | {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialAccount' q="reset=1"}{/capture} |
| 55 | {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} |
| 56 | {/if} |
| 57 | </td> |
| 58 | </tr> |
| 59 | <tr class="crm-paymentProcessor-form-block-payment-instrument-id"> |
| 60 | <td class="label">{$form.payment_instrument_id.label}</td><td>{$form.payment_instrument_id.html}</td> |
| 61 | </tr> |
| 62 | <tr class="crm-paymentProcessor-form-block-is_active"> |
| 63 | <td></td><td>{$form.is_active.html} {$form.is_active.label}</td> |
| 64 | </tr> |
| 65 | <tr class="crm-paymentProcessor-form-block-is_default"> |
| 66 | <td></td><td>{$form.is_default.html} {$form.is_default.label}</td> |
| 67 | </tr> |
| 68 | </table> |
| 69 | <fieldset> |
| 70 | <legend>{ts}Processor Details for Live Payments{/ts}</legend> |
| 71 | <table class="form-layout-compressed"> |
| 72 | <tr class="crm-paymentProcessor-form-block-user_name"> |
| 73 | <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> |
| 74 | </tr> |
| 75 | {if $form.password} |
| 76 | <tr class="crm-paymentProcessor-form-block-password"> |
| 77 | <td class="label">{$form.password.label}</td><td>{$form.password.html} {help id=$ppTypeName|cat:'-live-password' title=$form.password.label}</td> |
| 78 | </tr> |
| 79 | {/if} |
| 80 | {if $form.signature} |
| 81 | <tr class="crm-paymentProcessor-form-block-signature"> |
| 82 | <td class="label">{$form.signature.label}</td><td>{$form.signature.html} {help id=$ppTypeName|cat:'-live-signature' title=$form.signature.label}</td> |
| 83 | </tr> |
| 84 | {/if} |
| 85 | {if $form.subject} |
| 86 | <tr class="crm-paymentProcessor-form-block-subject"> |
| 87 | <td class="label">{$form.subject.label}</td><td>{$form.subject.html}</td> |
| 88 | </tr> |
| 89 | {/if} |
| 90 | <tr class="crm-paymentProcessor-form-block-url_site"> |
| 91 | <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> |
| 92 | </tr> |
| 93 | {if $form.url_api} |
| 94 | <tr class="crm-paymentProcessor-form-block-url_api"> |
| 95 | <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> |
| 96 | </tr> |
| 97 | {/if} |
| 98 | {if $is_recur} |
| 99 | <tr class="crm-paymentProcessor-form-block-url_recur"> |
| 100 | <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> |
| 101 | </tr> |
| 102 | {/if} |
| 103 | {if $form.url_button} |
| 104 | <tr class="crm-paymentProcessor-form-block-url_button"> |
| 105 | <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> |
| 106 | </tr> |
| 107 | {/if} |
| 108 | </table> |
| 109 | </fieldset> |
| 110 | |
| 111 | <fieldset> |
| 112 | <legend>{ts}Processor Details for Test Payments{/ts}</legend> |
| 113 | <table class="form-layout-compressed"> |
| 114 | <tr class="crm-paymentProcessor-form-block-test_user_name"> |
| 115 | <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> |
| 116 | {if $form.test_password} |
| 117 | <tr class="crm-paymentProcessor-form-block-test_password"> |
| 118 | <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> |
| 119 | </tr> |
| 120 | {/if} |
| 121 | {if $form.test_signature} |
| 122 | <tr class="crm-paymentProcessor-form-block-test_signature"> |
| 123 | <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> |
| 124 | </tr> |
| 125 | {/if} |
| 126 | {if $form.test_subject} |
| 127 | <tr class="crm-paymentProcessor-form-block-test_subject"> |
| 128 | <td class="label">{$form.test_subject.label}</td><td>{$form.test_subject.html}</td> |
| 129 | </tr> |
| 130 | {/if} |
| 131 | <tr class="crm-paymentProcessor-form-block-test_url_site"> |
| 132 | <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> |
| 133 | </tr> |
| 134 | {if $form.test_url_api} |
| 135 | <tr class="crm-paymentProcessor-form-block-test_url_api"> |
| 136 | <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> |
| 137 | </tr> |
| 138 | {/if} |
| 139 | {if $is_recur} |
| 140 | <tr class="crm-paymentProcessor-form-block-test_url_recur"> |
| 141 | <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> |
| 142 | </tr> |
| 143 | {/if} |
| 144 | {if $form.test_url_button} |
| 145 | <tr class="crm-paymentProcessor-form-block-test_url_button"> |
| 146 | <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> |
| 147 | </tr> |
| 148 | {/if} |
| 149 | {/if} |
| 150 | </table> |
| 151 | <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div> |
| 152 | </fieldset> |
| 153 | </div> |
| 154 | |
| 155 | {if $action eq 1 or $action eq 2} |
| 156 | <script type="text/javascript"> |
| 157 | {literal} |
| 158 | function reload(refresh) { |
| 159 | var paymentProcessorType = cj("#payment_processor_type_id"); |
| 160 | var url = {/literal}"{$refreshURL}"{literal} + "&pp=" + paymentProcessorType.val(); |
| 161 | paymentProcessorType.closest('form').attr('data-warn-changes', 'false'); |
| 162 | window.location.href = url; |
| 163 | } |
| 164 | {/literal} |
| 165 | </script> |
| 166 | |
| 167 | {/if} |