Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
fa938177 | 5 | | Copyright CiviCRM LLC (c) 2004-2016 | |
6a488035 TO |
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 | *} | |
6a488035 | 26 | <div class="crm-form-block"> |
e5e8ab99 CW |
27 | {if $action eq 8} |
28 | <div class="messages status no-popup"> | |
29 | <div class="icon inform-icon"></div> | |
30 | {ts}WARNING: Deleting this option will result in the loss of all data.{/ts} {ts}This action cannot be undone.{/ts} {ts}Do you want to continue?{/ts} | |
31 | </div> | |
32 | {else} | |
33 | <table class="form-layout"> | |
6a488035 | 34 | {if $showMember} |
e5e8ab99 CW |
35 | <tr class="crm-price-option-form-block-membership_type_id"> |
36 | <td class="label">{$form.membership_type_id.label}</td> | |
37 | <td>{$form.membership_type_id.html} | |
38 | <br /> <span class="description">{ts}If a membership type is selected, a membership will be created or renewed when users select this option. Leave this blank if you are using this for non-membership options (e.g. magazine subscription).{/ts} {help id="id-member-price-options" file="CRM/Price/Page/Field.hlp"}</span></td> | |
39 | </tr> | |
40 | <tr class="crm-price-option-form-block-membership_num_terms"> | |
41 | <td class="label">{$form.membership_num_terms.label}</td> | |
42 | <td>{$form.membership_num_terms.html} | |
43 | <br /> <span class="description">{ts}You can set this to a number other than one to allow multiple membership terms.{/ts}</span></td> | |
44 | </tr> | |
6a488035 TO |
45 | {/if} |
46 | <tr class="crm-price-option-form-block-label"> | |
e5e8ab99 | 47 | <td class="label">{$form.label.label}</td> |
94166e28 | 48 | <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$optionId}{/if}{$form.label.html}</td> |
e5e8ab99 CW |
49 | </tr> |
50 | <tr class="crm-price-option-form-block-amount"> | |
51 | <td class="label">{$form.amount.label}</td> | |
52 | <td>{$form.amount.html}</td> | |
53 | </tr> | |
5afce5ad | 54 | <tr class="crm-price-option-form-block-non-deductible-amount"> |
55 | <td class="label">{$form.non_deductible_amount.label}</td> | |
56 | <td>{$form.non_deductible_amount.html}</td> | |
57 | </tr> | |
e5e8ab99 CW |
58 | <tr class="crm-price-option-form-block-description"> |
59 | <td class="label">{$form.description.label}</td> | |
94166e28 | 60 | <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$optionId}{/if}{$form.description.html}</td> |
e5e8ab99 | 61 | </tr> |
5bfef8fa SL |
62 | <tr class="crm-price-option-form-block-help-pre"> |
63 | <td class="label">{$form.help_pre.label}</td> | |
64 | <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='help_pre' id=$optionId}{/if}{$form.help_pre.html}</td> | |
65 | </tr> | |
66 | <tr class="crm-price-option-form-block-help-post"> | |
67 | <td class="label">{$form.help_post.label}</td> | |
68 | <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='help_post' id=$optionId}{/if}{$form.help_post.html}</td> | |
69 | </tr> | |
152ff8b9 | 70 | <tr class="crm-price-option-form-block-financial-type"> |
e5e8ab99 CW |
71 | <td class="label">{$form.financial_type_id.label}</td> |
72 | <td> | |
73 | {if !$financialType } | |
74 | {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture} | |
75 | {ts 1=$ftUrl}There are no financial types configured with a linked 'Revenue Account of' account. <a href='%1'>Click here</a> if you want to configure financial types for your site.{/ts} | |
152ff8b9 | 76 | {else} |
e5e8ab99 CW |
77 | {$form.financial_type_id.html} |
78 | {/if} | |
79 | </td> | |
80 | </tr> | |
81 | {* fix for CRM-10241 *} | |
82 | {if $form.count.html} | |
83 | <tr class="crm-price-option-form-block-count"> | |
84 | <td class="label">{$form.count.label}</td> | |
85 | <td>{$form.count.html} {help id="id-participant-count" file="CRM/Price/Page/Field.hlp"}</td> | |
86 | </tr> | |
87 | {* 2 line fix for CRM-10241 *} | |
88 | {/if} | |
89 | {if $form.max_value.html} | |
90 | <tr class="crm-price-option-form-block-max_value"> | |
91 | <td class="label">{$form.max_value.label}</td> | |
92 | <td>{$form.max_value.html} {help id="id-participant-max" file="CRM/Price/Page/Field.hlp"}</td> | |
93 | </tr> | |
94 | {* fix for CRM-10241 *} | |
95 | {/if} | |
96 | <tr class="crm-price-option-form-block-weight"> | |
97 | <td class="label">{$form.weight.label}</td> | |
98 | <td>{$form.weight.html}</td> | |
99 | </tr> | |
100 | <tr class="crm-price-option-form-block-is_active"> | |
101 | <td class="label">{$form.is_active.label}</td> | |
102 | <td>{$form.is_active.html}</td> | |
103 | {if !$hideDefaultOption} | |
6a488035 | 104 | <tr class="crm-price-option-form-block-is_default"> |
e5e8ab99 CW |
105 | <td class="label">{$form.is_default.label}</td> |
106 | <td>{$form.is_default.html}</td> | |
107 | </tr> | |
6a488035 | 108 | {/if} |
e5e8ab99 | 109 | </table> |
6a488035 | 110 | |
e5e8ab99 CW |
111 | {literal} |
112 | <script type="text/javascript"> | |
6a488035 | 113 | |
e5e8ab99 CW |
114 | function calculateRowValues( ) { |
115 | var mtype = cj("#membership_type_id").val(); | |
116 | var postUrl = "{/literal}{crmURL p='civicrm/ajax/memType' h=0}{literal}"; | |
117 | cj.post( postUrl, {mtype: mtype}, function( data ) { | |
118 | cj("#amount").val( data.total_amount ); | |
119 | cj("#label").val( data.name ); | |
6a488035 | 120 | |
e5e8ab99 CW |
121 | }, 'json'); |
122 | } | |
123 | {/literal} | |
124 | </script> | |
125 | {/if} | |
6a488035 | 126 | |
6a488035 | 127 | |
e5e8ab99 CW |
128 | <div class="crm-submit-buttons"> |
129 | {include file="CRM/common/formButtons.tpl"} | |
130 | </div> | |
6a488035 | 131 | |
e5e8ab99 | 132 | </div> |
6a488035 | 133 |