Merge pull request #3835 from colemanw/groupCount
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionPage / Premium.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 *}
26 <div id="help">
27 {ts}Edit <strong>Premiums Settings</strong> to customize the title and introductory message (e.g ...in appreciation of your support, you will be able to select from a number of exciting thank-you gifts...). You can optionally provide a contact email address and/or phone number for inquiries.{/ts}
28 {ts}Then select and review the premiums that you want to offer on this contribution page.{/ts}
29 </div>
30 <div id="id_Premiums" class="crm-block crm-form-block crm-contribution-contributionpage-premium-form-block">
31 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
32 <table class="form-layout-compressed">
33 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_active">
34 <td class="label">{$form.premiums_active.label}</td>
35 <td class="html-adjust">{$form.premiums_active.html}<br/>
36 <span class="description">{ts}Is the Premiums section enabled for this Online Contributions page?{/ts}</span>
37 </td>
38 </tr>
39 </table>
40
41 <div id="premiumSettings">
42 <div class="crm-accordion-wrapper crm-premium-settings-accordion collapsed">
43 <div class="crm-accordion-header">
44 {ts}Premiums Settings{/ts}
45 </div>
46 <div class="crm-accordion-body">
47 <table class="form-layout-compressed">
48 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_title">
49 <td class="label">
50 {$form.premiums_intro_title.label}
51 {if $action == 2}
52 {include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums'
53 field='premiums_intro_title' id=$contributionPageID}
54 {/if}
55 </td>
56 <td class="html-adjust">{$form.premiums_intro_title.html}<br/>
57 <span class="description">{ts}Title to appear at the top of the Premiums section.{/ts}</span>
58 </td>
59 </tr>
60 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_intro_text">
61 <td class="label">
62 {$form.premiums_intro_text.label}
63 {if $action == 2}
64 {include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_premiums'
65 field='premiums_intro_text' id=$contributionPageID}
66 {/if}
67 </td>
68 <td class="html-adjust">{$form.premiums_intro_text.html}<br/>
69 <span class="description">
70 {ts}Enter content for the introductory message. This will be displayed below the Premiums section title.
71 You may include HTML formatting tags. You can also include images, as long as they are already
72 uploaded to a server - reference them using complete URLs.{/ts}
73 </span>
74 </td>
75 </tr>
76 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_email">
77 <td class="label">
78 {$form.premiums_contact_email.label}
79 </td>
80 <td class="html-adjust">{$form.premiums_contact_email.html}<br/>
81 <span class="description">
82 {ts}This email address is included in automated contribution receipts if the contributor has selected
83 a premium. It should be an appropriate contact mailbox for inquiries about premium
84 fulfillment/shipping.{/ts}
85 </span>
86 </td>
87 </tr>
88 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_contact_phone">
89 <td class="label">
90 {$form.premiums_contact_phone.label}
91 </td>
92 <td class="html-adjust">{$form.premiums_contact_phone.html}<br/>
93 <span class="description">
94 {ts}This phone number is included in automated contribution receipts if the contributor has selected
95 a premium. It should be an appropriate phone number for inquiries about premium
96 fulfillment/shipping.{/ts}
97 </span>
98 </td>
99 </tr>
100 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_display_min_contribution">
101 <td class="label">
102 {$form.premiums_display_min_contribution.label}
103 </td>
104 <td class="html-adjust">{$form.premiums_display_min_contribution.html}<br/>
105 <span class="description">
106 {ts}Should the minimum contribution amount be automatically displayed after each premium description?{/ts}
107 </span>
108 </td>
109 </tr>
110 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_label">
111 <td class="label">
112 {$form.premiums_nothankyou_label.label}<span class="marker"> *</span>
113 </td>
114 <td class="html-adjust">{$form.premiums_nothankyou_label.html}<br/>
115 <span class="description">{ts}You can change the text for the 'No thank-you' radio button.{/ts}</span>
116 </td>
117 </tr>
118 <tr class="crm-contribution-contributionpage-premium-form-block-premiums_nothankyou_position">
119 <td class="label">
120 {$form.premiums_nothankyou_position.label}
121 </td>
122 <td class="html-adjust">{$form.premiums_nothankyou_position.html}<br/>
123 <span class="description">
124 {ts}Place the 'No thank-you' radio button before OR after the list of premiums offered on this page.{/ts}
125 </span>
126 </td>
127 </tr>
128 </table>
129 </div>
130 <!-- /.crm-accordion-body -->
131 </div>
132 <!-- /.crm-accordion-wrapper -->
133
134 {* include premium product templates *}
135 {include file="CRM/Contribute/Page/Premium.tpl"}
136 </div>
137
138 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
139 </div>
140
141 <script type="text/javascript">
142 {literal}
143 CRM.$(function($) {
144
145 // bind click event to premiums_active checkbox
146 $('#premiums_active').click(function () {
147 premiumBlock();
148 });
149
150 // hide premium setting if premium block is not enabled
151 if (!$('#premiums_active').prop('checked')) {
152 $('#premiumSettings').hide();
153 }
154 });
155
156 // function to show/hide premium settings
157 function premiumBlock() {
158 if (cj('#premiums_active').prop('checked')) {
159 cj('#premiumSettings').show();
160 }
161 else {
162 cj('#premiumSettings').hide();
163 }
164 return false;
165 }
166
167 {/literal}
168 </script>