2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
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 |
8 +--------------------------------------------------------------------+
10 {if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') }
11 {capture assign="buttonTitle"}{ts}Configure Event{/ts}{/capture}
12 {crmButton target="_blank" p="civicrm/event/manage/settings" q="reset=1&action=update&id=`$event.id`" title="$buttonTitle" icon="fa-wrench"}{ts}Configure{/ts}{/crmButton}
13 <div class='clear'></div>
15 {* Callback snippet: Load payment processor *}
17 {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"}
20 {include file="CRM/common/TrackingFields.tpl"}
22 <div class="crm-event-id-{$event.id} crm-block crm-event-register-form-block">
24 {* moved to tpl since need to show only for primary participant page *}
25 {if $requireApprovalMsg || $waitlistMsg}
26 <div id="id-waitlist-approval-msg" class="messages status no-popup">
27 {if $requireApprovalMsg}
28 <div id="id-req-approval-msg">{$requireApprovalMsg}</div>
31 <div id="id-waitlist-msg">{$waitlistMsg}</div>
37 <div class="messages status no-popup crm-not-you-message" id="crm-event-register-different">
38 {ts 1=$display_name}Welcome %1{/ts}. (<a
39 href="{crmURL p='civicrm/event/register' q="cid=0&reset=1&id=`$event.id`"}"
40 title="{ts}Click here to register a different person for this event.{/ts}">{ts 1=$display_name}Not %1, or want to register a different person{/ts}</a>?)
43 {if $event.intro_text}
44 <div id="intro_text" class="crm-public-form-item crm-section intro_text-section">
45 <p>{$event.intro_text}</p>
49 {include file="CRM/common/cidzero.tpl"}
50 {if $pcpSupporterText}
51 <div class="crm-public-form-item crm-section pcpSupporterText-section">
52 <div class="content">{$pcpSupporterText}</div>
56 {if $form.additional_participants.html}
57 <div class="crm-public-form-item crm-section additional_participants-section" id="noOfparticipants">
58 <div class="label">{$form.additional_participants.label} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span></div>
60 {$form.additional_participants.html}{if $contact_id || $contact_id == NULL}{ts}(including yourself){/ts}{/if}
63 class="description">{ts}Fill in your registration information on this page. If you are registering additional people, you will be able to enter their registration information after you complete this page and click "Review your registration".{/ts}</span>
65 <div class="clear"></div>
69 <div class="crm-public-form-item crm-section cms_user-section">
70 {* User account registration option. Displays if enabled for one of the profiles on this page. *}
71 {include file="CRM/common/CMSUser.tpl"}
74 <div class="crm-public-form-item crm-section custom_pre-section">
75 {* Display "Top of page" profile immediately after the introductory text *}
76 {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
80 {if ! $quickConfig}<fieldset id="priceset" class="crm-public-form-item crm-group priceset-group">
81 <legend>{$event.fee_label}</legend>{/if}
82 {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"}
83 {include file="CRM/Price/Form/ParticipantCount.tpl"}
84 {if ! $quickConfig}</fieldset>{/if}
86 {if $pcp && $is_honor_roll }
87 <fieldset class="crm-public-form-item crm-group pcp-group">
88 <div class="crm-public-form-item crm-section pcp-section">
89 <div class="crm-public-form-item crm-section display_in_roll-section">
91 {$form.pcp_display_in_roll.html}
92 {$form.pcp_display_in_roll.label}
94 <div class="clear"></div>
96 <div id="nameID" class="crm-public-form-item crm-section is_anonymous-section">
98 {$form.pcp_is_anonymous.html}
100 <div class="clear"></div>
102 <div id="nickID" class="crm-public-form-item crm-section pcp_roll_nickname-section">
103 <div class="label">{$form.pcp_roll_nickname.label}</div>
104 <div class="content">{$form.pcp_roll_nickname.html}
106 class="description">{ts}Enter the name you want listed with this contribution. You can use a nick name like 'The Jones Family' or 'Sarah and Sam'.{/ts}</div>
108 <div class="clear"></div>
110 <div id="personalNoteID" class="crm-public-form-item crm-section pcp_personal_note-section">
111 <div class="label">{$form.pcp_personal_note.label}</div>
112 <div class="content">
113 {$form.pcp_personal_note.html}
114 <div class="description">{ts}Enter a message to accompany this contribution.{/ts}</div>
116 <div class="clear"></div>
122 {if $form.payment_processor_id.label}
123 <fieldset class="crm-public-form-item crm-group payment_options-group" style="display:none;">
124 <legend>{ts}Payment Options{/ts}</legend>
125 <div class="crm-section payment_processor-section">
126 <div class="label">{$form.payment_processor_id.label}</div>
127 <div class="content">{$form.payment_processor_id.html}</div>
128 <div class="clear"></div>
134 {include file='CRM/Core/BillingBlockWrapper.tpl'}
137 <div class="crm-public-form-item crm-section custom_post-section">
138 {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
142 {include file='CRM/common/ReCAPTCHA.tpl'}
145 <div id="crm-submit-buttons" class="crm-submit-buttons">
146 {include file="CRM/common/formButtons.tpl" location="bottom"}
149 {if $event.footer_text}
150 <div id="footer_text" class="crm-public-form-item crm-section event_footer_text-section">
151 <p>{$event.footer_text}</p>
155 <script type="text/javascript">
158 cj("#additional_participants").change(function () {
163 {if $pcp && $is_honor_roll }
168 function allowParticipant() {
169 {/literal}{if $allowGroupOnWaitlist}{literal}
170 var additionalParticipants = cj('#additional_participants').val();
171 var pricesetParticipantCount = 0;
172 {/literal}{if $priceSet}{literal}
173 pricesetParticipantCount = pPartiCount;
174 {/literal}{/if}{literal}
176 allowGroupOnWaitlist(additionalParticipants, pricesetParticipantCount);
177 {/literal}{/if}{literal}
180 {/literal}{if $allowGroupOnWaitlist}{literal}
181 allowGroupOnWaitlist(0, 0);
182 {/literal}{/if}{literal}
184 function allowGroupOnWaitlist(additionalParticipants, pricesetParticipantCount) {
185 {/literal}{if $isAdditionalParticipants}{literal}
186 if (!additionalParticipants) {
187 additionalParticipants = cj('#additional_participants').val();
189 {/literal}{else}{literal}
190 additionalParticipants = 0;
191 {/literal}{/if}{literal}
193 additionalParticipants = parseInt(additionalParticipants);
194 if (!additionalParticipants) {
195 additionalParticipants = 0;
198 var availableRegistrations = {/literal}'{$availableRegistrations}'{literal};
199 var totalParticipants = parseInt(additionalParticipants) + 1;
201 if (pricesetParticipantCount) {
202 // add priceset count if any
203 totalParticipants += parseInt(pricesetParticipantCount) - 1;
205 var isrequireApproval = {/literal}'{$requireApprovalMsg}'{literal};
207 if (totalParticipants > availableRegistrations) {
208 cj("#id-waitlist-msg").show();
209 cj("#id-waitlist-approval-msg").show();
211 //set the value for hidden bypass payment.
212 cj("#bypass_payment").val(1);
215 if (isrequireApproval) {
216 cj("#id-waitlist-approval-msg").show();
217 cj("#id-waitlist-msg").hide();
218 cj("#bypass_payment").val(1);
221 cj("#id-waitlist-approval-msg").hide();
222 cj("#bypass_payment").val(0);
224 //reset value since user don't want or not eligible for waitlist
230 {if $pcp && $is_honor_roll }{literal}
231 function pcpAnonymous() {
232 // clear nickname field if anonymous is true
233 if (document.getElementsByName("pcp_is_anonymous")[1].checked) {
234 document.getElementById('pcp_roll_nickname').value = '';
236 if (!document.getElementsByName("pcp_display_in_roll")[0].checked) {
237 cj('#nickID, #nameID, #personalNoteID').hide();
240 if (document.getElementsByName("pcp_is_anonymous")[0].checked) {
241 cj('#nameID, #nickID, #personalNoteID').show();
244 cj('#nameID').show();
245 cj('#nickID, #personalNoteID').hide();
255 {include file="CRM/Form/validate.tpl"}