2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2018 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 {* this template is used for adding/editing/deleting premium *}
27 <div class="crm-block crm-form-block crm-contribution-manage_premiums-form-block">
29 <div class="messages status no-popup">
30 <div class="icon inform-icon"></div>
31 {ts}Are you sure you want to delete this premium?{/ts} {ts}This action cannot be undone.{/ts} {ts}This will also remove the premium from any contribution pages that currently include it.{/ts}
33 {elseif $action eq 1024}
34 {include file="CRM/Contribute/Form/Contribution/PremiumBlock.tpl" context="previewPremium"}
36 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
37 {crmRegion name="contribute-form-managepremiums-standard-fields"}
38 <table class="form-layout-compressed">
39 <tr class="crm-contribution-form-block-name">
40 <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='name' id=$productId}{/if}
42 <td class="html-adjust">{$form.name.html}<br />
43 <span class="description">{ts}Name of the premium (product, service, subscription, etc.) as it will be displayed to contributors.{/ts}</span>
47 <td class="label">{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='description' id=$productId}{/if}
49 <td class="html-adjust">{$form.description.html}
51 <tr class="crm-contribution-form-block-sku">
52 <td class="label">{$form.sku.label}
54 <td class="html-adjust">{$form.sku.html}<br />
55 <span class="description">{ts}Optional product SKU or code. If used, this value will be included in contributor receipts.{/ts}</span>
58 <tr class="crm-contribution-form-block-imageOption" >
59 <td class="label">{$form.imageOption.label}</td>
61 <fieldset><div class="description">
62 <p>{ts}You can give this premium a picture that will be displayed on the contribution page. Both a 50 x 50 pixel thumbnail image and a 200 x 200 pixel larger image will be displayed. Images must be in GIF, JPEG, or PNG format.{/ts}</p>
63 <p>{ts}You can upload an image from your computer OR enter a URL for an image already on the Web. If you chose to upload an image file, a 'thumbnail' version will be automatically created for you. If you don't have an image available at this time, you may also choose to display a 'No Image Available' icon by selecting the 'default image'.{/ts}</p>
65 <table class="form-layout-compressed">
66 {if $thumbnailUrl}<tr class="odd-row"><td class="describe-image" colspan="2"><strong>Current Image Thumbnail</strong><br /><img src="{$thumbnailUrl}" /></td></tr>{/if}
67 <tr class="crm-contribution-form-block-imageOption"><td>{$form.imageOption.image.html}</td><td>{$form.uploadFile.html}</td></tr>
68 <tr class="crm-contribution-form-block-imageOption-thumbnail"><td colspan="2">{$form.imageOption.thumbnail.html}</td></tr>
69 <tr id="imageURL"{if $action neq 2} class="hiddenElement"{/if}>
70 <td class="label">{$form.imageUrl.label}</td><td>{$form.imageUrl.html|crmAddClass:huge}</td>
72 <tr id="thumbnailURL"{if $action neq 2} class="hiddenElement"{/if}>
73 <td class="label">{$form.thumbnailUrl.label}</td><td>{$form.thumbnailUrl.html|crmAddClass:huge}</td>
75 <tr><td colspan="2">{$form.imageOption.default_image.html}</td></tr>
76 <tr><td colspan="2">{$form.imageOption.noImage.html}</td></tr>
81 <tr class="crm-contribution-form-block-min_contribution">
82 <td class="label">{$form.min_contribution.label}</td>
83 <td class="html-adjust">{$form.min_contribution.html|crmMoney}<br />
84 <span class="description">{ts}The minimum contribution amount required to be eligible to select this premium. If you want to offer it to all contributors regardless of contribution amount, enter '0'. If display of minimum contribution amounts is enabled then this text is displayed:{/ts} <em>{ts}(Contribute at least X to be eligible for this gift.){/ts}</em></span>
87 <tr class="crm-contribution-form-block-price">
88 <td class="label">{$form.price.label}</td>
89 <td class="html-adjust">{$form.price.html|crmMoney}<br />
90 <span class="description">{ts}The market value of this premium (e.g. retail price). For tax-deductible contributions, this amount will be used to set the non-deductible amount in the contribution record and receipt.{/ts}</span>
93 <tr class="crm-contribution-form-block-cost">
94 <td class="label">{$form.cost.label}</td>
95 <td class="html-adjust">{$form.cost.html|crmMoney}<br />
96 <span class="description">{ts}You may optionally record the actual cost of this premium to your organization. This may be useful when evaluating net return for this incentive.{/ts}</span>
99 <tr class="crm-contribution-form-block-financial_type">
100 <td class="label">{$form.financial_type_id.label}</td>
101 <td class="html-adjust">
103 {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture}
104 {ts 1=$ftUrl}There are no financial types configured with linked 'Cost of Sales Premiums' and 'Premiums Inventory Account' accounts. If you want to generate accounting transactions which track the cost of premiums used <a href='%1'>click here</a> to configure financial types and accounts.{/ts}
106 {$form.financial_type_id.html}<br />
107 <span class="description">{ts}Select a financial type that is linked to both a 'Cost of Sales Premiums Account' and a 'Premiums Inventory Account' if you want to generate accounting transactions to track the cost of premiums used.{/ts}</span>
111 <tr class="crm-contribution-form-block-options">
112 <td class="label">{$form.options.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='options' id=$productId}{/if}</td>
113 <td class="html-adjust">{$form.options.html}<br />
114 <span class="description">{ts}Enter a comma-delimited list of color, size, etc. options for the product if applicable. Contributors will be presented a drop-down menu of these options when they select this product.{/ts}</span>
117 <tr class="crm-contribution-form-block-is_active">
118 <td class="label">{$form.is_active.label}</td>
119 <td class="html-adjust">{$form.is_active.html}</td>
123 {crmRegion name="contribute-form-managepremiums-other-fields"}
124 <fieldset id="time-delimited" class="crm-collapsible {if empty($showSubscriptions)}collapsed{/if}">
125 <legend class="collapsible-title">{ts}Subscription or Service Settings{/ts}</legend>
127 <table class="form-layout-compressed">
128 <tr class="crm-contribution-form-block-period_type">
129 <td class="label">{$form.period_type.label}</td>
130 <td class="html-adjust">{$form.period_type.html}<br />
131 <span class="description">{ts}Select 'Rolling' if the subscription or service starts on the current day. Select 'Fixed' if the start date is a fixed month and day within the current year (set this value in the next field).{/ts}</span>
134 <tr class="crm-contribution-form-block-fixed_period_start_day">
135 <td class="label">{$form.fixed_period_start_day.label}</td>
136 <td class="html-adjust">{$form.fixed_period_start_day.html}<br />
137 <span class="description">{ts}Month and day (MMDD) on which a fixed period subscription or service will start. EXAMPLE: A fixed period subscription with Start Day set to 0101 means that the subscription period would be 1/1/06 - 12/31/06 for anyone signing up during 2006.{/ts}</span>
140 <tr class="crm-contribution-form-block-duration_interval">
141 <td class="label">{$form.duration_interval.label}</td>
142 <td class="html-adjust">{$form.duration_interval.html} {$form.duration_unit.html}<br />
143 <span class="description">{ts}Duration of subscription or service (e.g. 12-month subscription).{/ts}</span>
146 <tr class="crm-contribution-form-block-frequency_interval">
147 <td class="label">{$form.frequency_interval.label}</td>
148 <td class="html-adjust">{$form.frequency_interval.html} {$form.frequency_unit.html}<br />
149 <span class="description">{ts}Frequency of subscription or service (e.g. journal delivered every two months).{/ts}</span>
157 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
159 {if $action eq 1 or $action eq 2 }
161 <script type="text/javascript">
164 function add_upload_file_block(parms) {
165 if (parms =='thumbnail') {
167 document.getElementById("imageURL").style.display="table-row";
168 document.getElementById("thumbnailURL").style.display="table-row";
172 document.getElementById("imageURL").style.display="none";
173 document.getElementById("thumbnailURL").style.display="none";