2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 <table class="form-layout-compressed">
38 <tr class="crm-contribution-form-block-name">
39 <td class="label">{$form.name.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='name' id=$productId}{/if}
41 <td class="html-adjust">{$form.name.html}<br />
42 <span class="description">{ts}Name of the premium (product, service, subscription, etc.) as it will be displayed to contributors.{/ts}</span>
46 <td class="label">{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_product' field='description' id=$productId}{/if}
48 <td class="html-adjust">{$form.description.html}
50 <tr class="crm-contribution-form-block-sku">
51 <td class="label">{$form.sku.label}
53 <td class="html-adjust">{$form.sku.html}<br />
54 <span class="description">{ts}Optional product SKU or code. If used, this value will be included in contributor receipts.{/ts}</span>
57 <tr class="crm-contribution-form-block-imageOption" >
58 <td class="label">{$form.imageOption.label}</td>
60 <fieldset><div class="description">
61 <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>
62 <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>
64 <table class="form-layout-compressed">
65 {if $thumbnailUrl}<tr class="odd-row"><td class="describe-image" colspan="2"><strong>Current Image Thumbnail</strong><br /><img src="{$thumbnailUrl}" /></td></tr>{/if}
66 <tr class="crm-contribution-form-block-imageOption"><td>{$form.imageOption.image.html}</td><td>{$form.uploadFile.html}</td></tr>
67 <tr class="crm-contribution-form-block-imageOption-thumbnail"><td colspan="2">{$form.imageOption.thumbnail.html}</td></tr>
68 <tr id="imageURL"{if $action eq 2}class="show-row" {else} class="hide-row" {/if}>
69 <td class="label">{$form.imageUrl.label}</td><td>{$form.imageUrl.html|crmAddClass:huge}</td>
71 <tr id="thumbnailURL"{if $action eq 2}class="show-row" {else} class="hide-row" {/if}>
72 <td class="label">{$form.thumbnailUrl.label}</td><td>{$form.thumbnailUrl.html|crmAddClass:huge}</td>
74 <tr><td colspan="2">{$form.imageOption.default_image.html}</td></tr>
75 <tr><td colspan="2">{$form.imageOption.noImage.html}</td></tr>
80 <tr class="crm-contribution-form-block-min_contribution">
81 <td class="label">{$form.min_contribution.label}</td>
82 <td class="html-adjust">{$form.min_contribution.html|crmMoney}<br />
83 <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>
86 <tr class="crm-contribution-form-block-price">
87 <td class="label">{$form.price.label}</td>
88 <td class="html-adjust">{$form.price.html|crmMoney}<br />
89 <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>
92 <tr class="crm-contribution-form-block-cost">
93 <td class="label">{$form.cost.label}</td>
94 <td class="html-adjust">{$form.cost.html|crmMoney}<br />
95 <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>
98 <tr class="crm-contribution-form-block-financial_type">
99 <td class="label">{$form.financial_type_id.label}</td>
100 <td class="html-adjust">
102 {capture assign=ftUrl}{crmURL p='civicrm/admin/financial/financialType' q="reset=1"}{/capture}
103 {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}
105 {$form.financial_type_id.html}<br />
106 <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>
110 <tr class="crm-contribution-form-block-options">
111 <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>
112 <td class="html-adjust">{$form.options.html}<br />
113 <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>
116 <tr class="crm-contribution-form-block-is_active">
117 <td class="label">{$form.is_active.label}</td>
118 <td class="html-adjust">{$form.is_active.html}</td>
121 <fieldset id="time-delimited" class="crm-collapsible {if empty($showSubscriptions)}collapsed{/if}">
122 <legend class="collapsible-title">{ts}Subscription or Service Settings{/ts}</legend>
124 <table class="form-layout-compressed">
125 <tr class="crm-contribution-form-block-period_type">
126 <td class="label">{$form.period_type.label}</td>
127 <td class="html-adjust">{$form.period_type.html}<br />
128 <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>
131 <tr class="crm-contribution-form-block-fixed_period_start_day">
132 <td class="label">{$form.fixed_period_start_day.label}</td>
133 <td class="html-adjust">{$form.fixed_period_start_day.html}<br />
134 <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>
137 <tr class="crm-contribution-form-block-duration_interval">
138 <td class="label">{$form.duration_interval.label}</td>
139 <td class="html-adjust">{$form.duration_interval.html} {$form.duration_unit.html}<br />
140 <span class="description">{ts}Duration of subscription or service (e.g. 12-month subscription).{/ts}</span>
143 <tr class="crm-contribution-form-block-frequency_interval">
144 <td class="label">{$form.frequency_interval.label}</td>
145 <td class="html-adjust">{$form.frequency_interval.html} {$form.frequency_unit.html}<br />
146 <span class="description">{ts}Frequency of subscription or service (e.g. journal delivered every two months).{/ts}</span>
153 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
155 {if $action eq 1 or $action eq 2 }
157 <script type="text/javascript">
160 function add_upload_file_block(parms) {
161 if (parms =='thumbnail') {
163 document.getElementById("imageURL").style.display="table-row";
164 document.getElementById("thumbnailURL").style.display="table-row";
168 document.getElementById("imageURL").style.display="none";
169 document.getElementById("thumbnailURL").style.display="none";