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 | *} | |
6a488035 | 10 | <div class="crm-form-block"> |
e5e8ab99 CW |
11 | {if $action eq 8} |
12 | <div class="messages status no-popup"> | |
13 | <div class="icon inform-icon"></div> | |
14 | {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} | |
15 | </div> | |
16 | {else} | |
17 | <table class="form-layout"> | |
6a488035 | 18 | {if $showMember} |
e5e8ab99 CW |
19 | <tr class="crm-price-option-form-block-membership_type_id"> |
20 | <td class="label">{$form.membership_type_id.label}</td> | |
21 | <td>{$form.membership_type_id.html} | |
22 | <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> | |
23 | </tr> | |
24 | <tr class="crm-price-option-form-block-membership_num_terms"> | |
25 | <td class="label">{$form.membership_num_terms.label}</td> | |
26 | <td>{$form.membership_num_terms.html} | |
27 | <br /> <span class="description">{ts}You can set this to a number other than one to allow multiple membership terms.{/ts}</span></td> | |
28 | </tr> | |
6a488035 TO |
29 | {/if} |
30 | <tr class="crm-price-option-form-block-label"> | |
e5e8ab99 | 31 | <td class="label">{$form.label.label}</td> |
94166e28 | 32 | <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 |
33 | </tr> |
34 | <tr class="crm-price-option-form-block-amount"> | |
35 | <td class="label">{$form.amount.label}</td> | |
36 | <td>{$form.amount.html}</td> | |
37 | </tr> | |
5afce5ad | 38 | <tr class="crm-price-option-form-block-non-deductible-amount"> |
39 | <td class="label">{$form.non_deductible_amount.label}</td> | |
40 | <td>{$form.non_deductible_amount.html}</td> | |
41 | </tr> | |
e5e8ab99 CW |
42 | <tr class="crm-price-option-form-block-description"> |
43 | <td class="label">{$form.description.label}</td> | |
94166e28 | 44 | <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 | 45 | </tr> |
5bfef8fa SL |
46 | <tr class="crm-price-option-form-block-help-pre"> |
47 | <td class="label">{$form.help_pre.label}</td> | |
48 | <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> | |
49 | </tr> | |
50 | <tr class="crm-price-option-form-block-help-post"> | |
51 | <td class="label">{$form.help_post.label}</td> | |
52 | <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> | |
53 | </tr> | |
152ff8b9 | 54 | <tr class="crm-price-option-form-block-financial-type"> |
e5e8ab99 CW |
55 | <td class="label">{$form.financial_type_id.label}</td> |
56 | <td> | |
57 | {if !$financialType } | |
58 | {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture} | |
59 | {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 | 60 | {else} |
e5e8ab99 CW |
61 | {$form.financial_type_id.html} |
62 | {/if} | |
63 | </td> | |
64 | </tr> | |
65 | {* fix for CRM-10241 *} | |
66 | {if $form.count.html} | |
67 | <tr class="crm-price-option-form-block-count"> | |
68 | <td class="label">{$form.count.label}</td> | |
69 | <td>{$form.count.html} {help id="id-participant-count" file="CRM/Price/Page/Field.hlp"}</td> | |
70 | </tr> | |
71 | {* 2 line fix for CRM-10241 *} | |
72 | {/if} | |
73 | {if $form.max_value.html} | |
74 | <tr class="crm-price-option-form-block-max_value"> | |
75 | <td class="label">{$form.max_value.label}</td> | |
76 | <td>{$form.max_value.html} {help id="id-participant-max" file="CRM/Price/Page/Field.hlp"}</td> | |
77 | </tr> | |
78 | {* fix for CRM-10241 *} | |
79 | {/if} | |
80 | <tr class="crm-price-option-form-block-weight"> | |
81 | <td class="label">{$form.weight.label}</td> | |
82 | <td>{$form.weight.html}</td> | |
83 | </tr> | |
84 | <tr class="crm-price-option-form-block-is_active"> | |
85 | <td class="label">{$form.is_active.label}</td> | |
86 | <td>{$form.is_active.html}</td> | |
87 | {if !$hideDefaultOption} | |
6a488035 | 88 | <tr class="crm-price-option-form-block-is_default"> |
e5e8ab99 CW |
89 | <td class="label">{$form.is_default.label}</td> |
90 | <td>{$form.is_default.html}</td> | |
91 | </tr> | |
6a488035 | 92 | {/if} |
2db35bf6 AF |
93 | <tr class="crm-price-field-form-block-visibility_id"> |
94 | <td class="label">{$form.visibility_id.label}</td> | |
a13c171d | 95 | <td> {$form.visibility_id.html} {help id="id-visibility-options" file="CRM/Price/Page/Field.hlp"}</td> |
2db35bf6 | 96 | </tr> |
e5e8ab99 | 97 | </table> |
6a488035 | 98 | |
e5e8ab99 CW |
99 | {literal} |
100 | <script type="text/javascript"> | |
6a488035 | 101 | |
e5e8ab99 CW |
102 | function calculateRowValues( ) { |
103 | var mtype = cj("#membership_type_id").val(); | |
104 | var postUrl = "{/literal}{crmURL p='civicrm/ajax/memType' h=0}{literal}"; | |
105 | cj.post( postUrl, {mtype: mtype}, function( data ) { | |
106 | cj("#amount").val( data.total_amount ); | |
107 | cj("#label").val( data.name ); | |
6a488035 | 108 | |
e5e8ab99 CW |
109 | }, 'json'); |
110 | } | |
111 | {/literal} | |
112 | </script> | |
113 | {/if} | |
6a488035 | 114 | |
6a488035 | 115 | |
e5e8ab99 CW |
116 | <div class="crm-submit-buttons"> |
117 | {include file="CRM/common/formButtons.tpl"} | |
118 | </div> | |
6a488035 | 119 | |
e5e8ab99 | 120 | </div> |