Metadata fix - phone_type_id, location_type_id, gender_id
[civicrm-core.git] / templates / CRM / common / deferredFinancialType.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 {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.validate').click(function(e) {
16 var message = "{/literal} {if $context eq 'Event'}
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}
18 {else if $context eq 'MembershipType'}
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}
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}