Commit | Line | Data |
---|---|---|
cebff547 PN |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
cebff547 | 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 | | |
cebff547 PN |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if isset($deferredFinancialType)} | |
11 | <div id='warningDialog' style="display:none;"></div> | |
12 | {literal} | |
13 | <script type="text/javascript"> | |
14 | CRM.$(function($) { | |
15 | var more = $('.crm-button input.validate').click(function(e) { | |
16 | var message = "{/literal} {if $context eq 'Event'} | |
8838f818 | 17 | {ts escape='js'}Note: Revenue for this event registration will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts} |
cebff547 | 18 | {else if $context eq 'MembershipType'} |
8838f818 | 19 | {ts escape='js'}Note: Revenue for these types of memberships will not be deferred as the financial type does not have a deferred revenue account setup for it. If you want the revenue to be deferred, please select a different Financial Type with a Deferred Revenue account setup for it, or setup a Deferred Revenue account for this Financial Type.{/ts} |
cebff547 PN |
20 | {/if} |
21 | {literal}"; | |
22 | var deferredFinancialType = {/literal}{$deferredFinancialType|@json_encode}{literal}; | |
23 | var financialType = parseInt($('#financial_type_id').val()); | |
24 | if ($.inArray(financialType, deferredFinancialType) == -1) { | |
25 | return confirm(message); | |
26 | } | |
27 | }); | |
28 | }); | |
29 | </script> | |
30 | {/literal} | |
31 | {/if} |