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`" fb=1 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>
36 {crmRegion name='event-register-not-you-block'}
38 <div class="messages status no-popup crm-not-you-message" id="crm-event-register-different">
39 {ts 1=$display_name}Welcome %1{/ts}. (<a
40 href="{crmURL p='civicrm/event/register' q="cid=0&reset=1&id=`$event.id`"}"
41 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>?)
46 {if $event.intro_text}
47 <div id="intro_text" class="crm-public-form-item crm-section intro_text-section">
48 <p>{$event.intro_text}</p>
52 {include file="CRM/common/cidzero.tpl"}
53 {if $pcpSupporterText}
54 <div class="crm-public-form-item crm-section pcpSupporterText-section">
55 <div class="content">{$pcpSupporterText}</div>
59 {if !empty($form.additional_participants.html)}
60 <div class="crm-public-form-item crm-section additional_participants-section" id="noOfparticipants">
61 <div class="label">{$form.additional_participants.label} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span></div>
63 {$form.additional_participants.html}{if $contact_id || $contact_id == NULL}{ts}(including yourself){/ts}{/if}
66 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>
68 <div class="clear"></div>
72 <div class="crm-public-form-item crm-section cms_user-section">
73 {* User account registration option. Displays if enabled for one of the profiles on this page. *}
74 {include file="CRM/common/CMSUser.tpl"}
77 <div class="crm-public-form-item crm-section custom_pre-section">
78 {* Display "Top of page" profile immediately after the introductory text *}
79 {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
83 {if ! $quickConfig}<fieldset id="priceset" class="crm-public-form-item crm-group priceset-group">
84 <legend>{$event.fee_label}</legend>{/if}
85 {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"}
86 {include file="CRM/Price/Form/ParticipantCount.tpl"}
87 {if ! $quickConfig}</fieldset>{/if}
89 {if $pcp && $is_honor_roll }
90 <fieldset class="crm-public-form-item crm-group pcp-group">
91 <div class="crm-public-form-item crm-section pcp-section">
92 <div class="crm-public-form-item crm-section display_in_roll-section">
94 {$form.pcp_display_in_roll.html}
95 {$form.pcp_display_in_roll.label}
97 <div class="clear"></div>
99 <div id="nameID" class="crm-public-form-item crm-section is_anonymous-section">
100 <div class="content">
101 {$form.pcp_is_anonymous.html}
103 <div class="clear"></div>
105 <div id="nickID" class="crm-public-form-item crm-section pcp_roll_nickname-section">
106 <div class="label">{$form.pcp_roll_nickname.label}</div>
107 <div class="content">{$form.pcp_roll_nickname.html}
109 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>
111 <div class="clear"></div>
113 <div id="personalNoteID" class="crm-public-form-item crm-section pcp_personal_note-section">
114 <div class="label">{$form.pcp_personal_note.label}</div>
115 <div class="content">
116 {$form.pcp_personal_note.html}
117 <div class="description">{ts}Enter a message to accompany this contribution.{/ts}</div>
119 <div class="clear"></div>
125 {if !empty($form.payment_processor_id.label)}
126 <fieldset class="crm-public-form-item crm-group payment_options-group" style="display:none;">
127 <legend>{ts}Payment Options{/ts}</legend>
128 <div class="crm-section payment_processor-section">
129 <div class="label">{$form.payment_processor_id.label}</div>
130 <div class="content">{$form.payment_processor_id.html}</div>
131 <div class="clear"></div>
137 {include file='CRM/Core/BillingBlockWrapper.tpl'}
140 <div class="crm-public-form-item crm-section custom_post-section">
141 {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
145 {include file='CRM/common/ReCAPTCHA.tpl'}
148 <div id="crm-submit-buttons" class="crm-submit-buttons">
149 {include file="CRM/common/formButtons.tpl" location="bottom"}
152 {if $event.footer_text}
153 <div id="footer_text" class="crm-public-form-item crm-section event_footer_text-section">
154 <p>{$event.footer_text}</p>
158 <script type="text/javascript">
161 cj("#additional_participants").change(function () {
162 if (typeof skipPaymentMethod == 'function') {
163 // For free event there is no involvement of payment processor, hence
164 // this function is not available. if above condition not present
165 // then you will receive JS Error in case you change multiple
166 // registrant option.
172 {if $pcp && $is_honor_roll }
177 function allowParticipant() {
178 {/literal}{if $allowGroupOnWaitlist}{literal}
179 var additionalParticipants = cj('#additional_participants').val();
180 var pricesetParticipantCount = 0;
181 {/literal}{if $priceSet}{literal}
182 pricesetParticipantCount = pPartiCount;
183 {/literal}{/if}{literal}
185 allowGroupOnWaitlist(additionalParticipants, pricesetParticipantCount);
186 {/literal}{/if}{literal}
189 {/literal}{if $allowGroupOnWaitlist}{literal}
190 allowGroupOnWaitlist(0, 0);
191 {/literal}{/if}{literal}
193 function allowGroupOnWaitlist(additionalParticipants, pricesetParticipantCount) {
194 {/literal}{if $isAdditionalParticipants}{literal}
195 if (!additionalParticipants) {
196 additionalParticipants = cj('#additional_participants').val();
198 {/literal}{else}{literal}
199 additionalParticipants = 0;
200 {/literal}{/if}{literal}
202 additionalParticipants = parseInt(additionalParticipants);
203 if (!additionalParticipants) {
204 additionalParticipants = 0;
207 var availableRegistrations = {/literal}'{$availableRegistrations}'{literal};
208 var totalParticipants = parseInt(additionalParticipants) + 1;
210 if (pricesetParticipantCount) {
211 // add priceset count if any
212 totalParticipants += parseInt(pricesetParticipantCount) - 1;
214 var isrequireApproval = {/literal}'{$requireApprovalMsg}'{literal};
216 if (totalParticipants > availableRegistrations) {
217 cj("#id-waitlist-msg").show();
218 cj("#id-waitlist-approval-msg").show();
220 //set the value for hidden bypass payment.
221 cj("#bypass_payment").val(1);
224 if (isrequireApproval) {
225 cj("#id-waitlist-approval-msg").show();
226 cj("#id-waitlist-msg").hide();
227 cj("#bypass_payment").val(1);
230 cj("#id-waitlist-approval-msg").hide();
231 cj("#bypass_payment").val(0);
233 //reset value since user don't want or not eligible for waitlist
234 if (typeof skipPaymentMethod == 'function') {
235 // For free event there is no involvement of payment processor, hence
236 // this function is not available. if above condition not present
237 // then you will receive JS Error in case register multiple participants
238 // enabled and require approval.
245 {if $pcp && $is_honor_roll }{literal}
246 function pcpAnonymous() {
247 // clear nickname field if anonymous is true
248 if (document.getElementsByName("pcp_is_anonymous")[1].checked) {
249 document.getElementById('pcp_roll_nickname').value = '';
251 if (!document.getElementsByName("pcp_display_in_roll")[0].checked) {
252 cj('#nickID, #nameID, #personalNoteID').hide();
255 if (document.getElementsByName("pcp_is_anonymous")[0].checked) {
256 cj('#nameID, #nickID, #personalNoteID').show();
259 cj('#nameID').show();
260 cj('#nickID, #personalNoteID').hide();
270 {include file="CRM/Form/validate.tpl"}