2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 +--------------------------------------------------------------------+
27 {include file="CRM/Core/BillingBlock.tpl" context="front-end"}
29 <div id="paypalExpress">
30 {* Put PayPal Express button after customPost block since it's the submit button in this case. *}
31 {if $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}
32 {assign var=expressButtonName value='_qf_Register_upload_express'}
33 <fieldset class="crm-group payPalExpress-group"><legend>{ts}Checkout with PayPal{/ts}</legend>
34 <div class="description">{ts}Click the PayPal button to continue.{/ts}</div>
35 <div>{$form.$expressButtonName.html} <span style="font-size:11px; font-family: Arial, Verdana;">Checkout securely. Pay without sharing your financial information. </span>
42 {include file="CRM/Event/Form/Registration/PreviewHeader.tpl"}
45 {include file="CRM/common/TrackingFields.tpl"}
47 {capture assign='reqMark'}<span class="marker" title="{ts}This field is required.{/ts}">*</span>{/capture}
48 <div class="crm-block crm-event-register-form-block">
50 {* moved to tpl since need to show only for primary participant page *}
51 {if $requireApprovalMsg || $waitlistMsg}
52 <div id = "id-waitlist-approval-msg" class="messages status no-popup">
53 {if $requireApprovalMsg}
54 <div id="id-req-approval-msg">{$requireApprovalMsg}</div>
57 <div id="id-waitlist-msg">{$waitlistMsg}</div>
63 <div class="messages status no-popup" id="crm-event-register-different">
64 {ts 1=$display_name}Welcome %1{/ts}. (<a href="{crmURL p='civicrm/event/register' q="cid=0&reset=1&id=`$event.id`"}" 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>?)</div>
66 {if $event.intro_text}
67 <div id="intro_text" class="crm-section intro_text-section">
68 <p>{$event.intro_text}</p>
72 {if $pcpSupporterText}
73 <div class="crm-section pcpSupporterText-section">
74 <div class="content">{$pcpSupporterText}</div>
78 {if $form.additional_participants.html}
79 <div class="crm-section additional_participants-section" id="noOfparticipants">
80 <div class="label">{$form.additional_participants.label}</div>
82 {$form.additional_participants.html}{if $contact_id || $contact_id == NULL} ({ts}including yourself{/ts}){/if}<br />
83 <span 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 "Continue".{/ts}</span>
85 <div class="clear"></div>
90 {if ! $quickConfig}<fieldset id="priceset" class="crm-group priceset-group"><legend>{$event.fee_label}</legend>{/if}
91 {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"}
92 {include file="CRM/Price/Form/ParticipantCount.tpl"}
93 {if ! $quickConfig}</fieldset>{/if}
95 {if $form.is_pay_later}
96 <div class="crm-section pay_later-section">
97 <div class="label"> </div>
98 <div class="content">{$form.is_pay_later.html} {$form.is_pay_later.label}</div>
99 <div class="clear"></div>
104 {include file="CRM/Price/Form/InitialPayment.tpl" extends="Contribution" paymentMode='online'}
106 {if $pcp && $is_honor_roll }
107 <fieldset class="crm-group pcp-group">
108 <div class="crm-section pcp-section">
109 <div class="crm-section display_in_roll-section">
110 <div class="content">
111 {$form.pcp_display_in_roll.html}
112 {$form.pcp_display_in_roll.label}
114 <div class="clear"></div>
116 <div id="nameID" class="crm-section is_anonymous-section">
117 <div class="content">
118 {$form.pcp_is_anonymous.html}
120 <div class="clear"></div>
122 <div id="nickID" class="crm-section pcp_roll_nickname-section">
123 <div class="label">{$form.pcp_roll_nickname.label}</div>
124 <div class="content">{$form.pcp_roll_nickname.html}
125 <div 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>
127 <div class="clear"></div>
129 <div id="personalNoteID" class="crm-section pcp_personal_note-section">
130 <div class="label">{$form.pcp_personal_note.label}</div>
131 <div class="content">
132 {$form.pcp_personal_note.html}
133 <div class="description">{ts}Enter a message to accompany this contribution.{/ts}</div>
135 <div class="clear"></div>
141 {* User account registration option. Displays if enabled for one of the profiles on this page. *}
142 {include file="CRM/common/CMSUser.tpl"}
144 {include file="CRM/UF/Form/Block.tpl" fields=$customPre}
146 {if $form.payment_processor.label}
147 <fieldset class="crm-group payment_options-group">
148 <legend>{ts}Payment Options{/ts}</legend>
149 <div class="crm-section payment_processor-section">
150 <div class="label">{$form.payment_processor.label}</div>
151 <div class="content">{$form.payment_processor.html}</div>
152 <div class="clear"></div>
157 <div id="billing-payment-block"></div>
158 {include file="CRM/common/paymentBlock.tpl"}
160 {include file="CRM/UF/Form/Block.tpl" fields=$customPost}
163 {include file='CRM/common/ReCAPTCHA.tpl'}
166 <div id="crm-submit-buttons" class="crm-submit-buttons">
167 {include file="CRM/common/formButtons.tpl" location="bottom"}
170 {if $event.footer_text}
171 <div id="footer_text" class="crm-section event_footer_text-section">
172 <p>{$event.footer_text}</p>
177 <script type="text/javascript">
179 function toggleConfirmButton() {
180 var payPalExpressId = {/literal}{$payPalExpressId}{literal};
181 var elementObj = cj('input[name="payment_processor"]');
182 if ( elementObj.attr('type') == 'hidden' ) {
183 var processorTypeId = elementObj.val( );
185 var processorTypeId = elementObj.filter(':checked').val();
188 if (payPalExpressId !=0 && payPalExpressId == processorTypeId) {
189 cj("#crm-submit-buttons").hide();
191 cj("#crm-submit-buttons").show();
195 cj('input[name="payment_processor"]').change( function() {
196 toggleConfirmButton();
200 toggleConfirmButton();
206 <script type="text/javascript">
207 {/literal}{if $pcp && $is_honor_roll }pcpAnonymous();{/if}{literal}
209 function allowParticipant( ) {
210 {/literal}{if $allowGroupOnWaitlist}{literal}
211 var additionalParticipants = cj('#additional_participants').val();
212 var pricesetParticipantCount = 0;
213 {/literal}{if $priceSet}{literal}
214 pricesetParticipantCount = pPartiCount;
215 {/literal}{/if}{literal}
217 allowGroupOnWaitlist( additionalParticipants, pricesetParticipantCount );
218 {/literal}{/if}{literal}
221 {/literal}{if ($form.is_pay_later or $bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}
223 showHidePayPalExpressOption( );
224 {/literal}{/if}{literal}
226 function showHidePayPalExpressOption( )
228 var payLaterElement = {/literal}{if $form.is_pay_later}true{else}false{/if}{literal};
229 if ( ( cj("#bypass_payment").val( ) == 1 ) ||
230 ( payLaterElement && document.getElementsByName('is_pay_later')[0].checked ) ) {
231 cj("#crm-submit-buttons").show();
232 cj("#paypalExpress").hide();
234 cj("#paypalExpress").show();
235 cj("#crm-submit-buttons").hide();
239 {/literal}{if ($form.is_pay_later or $bypassPayment) and $showHidePaymentInformation}{literal}
240 showHidePaymentInfo( );
241 {/literal} {/if}{literal}
243 function showHidePaymentInfo( )
245 var payLater = {/literal}{if $form.is_pay_later}true{else}false{/if}{literal};
247 if ( ( cj("#bypass_payment").val( ) == 1 ) ||
248 ( payLater && document.getElementsByName('is_pay_later')[0].checked ) ) {
249 cj('#billing-payment-block').hide();
251 cj('#billing-payment-block').show();
255 {/literal}{if $allowGroupOnWaitlist}{literal}
256 allowGroupOnWaitlist( 0, 0 );
257 {/literal}{/if}{literal}
259 function allowGroupOnWaitlist( additionalParticipants, pricesetParticipantCount )
261 {/literal}{if $isAdditionalParticipants}{literal}
262 if ( !additionalParticipants ) {
263 additionalParticipants = cj('#additional_participants').val();
265 {/literal}{else}{literal}
266 additionalParticipants = 0;
267 {/literal}{/if}{literal}
269 additionalParticipants = parseInt( additionalParticipants );
270 if ( ! additionalParticipants ) {
271 additionalParticipants = 0;
274 var availableRegistrations = {/literal}'{$availableRegistrations}'{literal};
275 var totalParticipants = parseInt( additionalParticipants ) + 1;
277 if ( pricesetParticipantCount ) {
278 // add priceset count if any
279 totalParticipants += parseInt(pricesetParticipantCount) - 1;
281 var isrequireApproval = {/literal}'{$requireApprovalMsg}'{literal};
283 if ( totalParticipants > availableRegistrations ) {
284 cj( "#id-waitlist-msg" ).show( );
285 cj( "#id-waitlist-approval-msg" ).show( );
287 //set the value for hidden bypass payment.
288 cj( "#bypass_payment").val( 1 );
291 {/literal}{if $form.is_pay_later}{literal}
292 cj("#is-pay-later").hide( );
293 {/literal} {/if}{literal}
296 if ( isrequireApproval ) {
297 cj( "#id-waitlist-approval-msg" ).show( );
298 cj( "#id-waitlist-msg" ).hide( );
300 cj( "#id-waitlist-approval-msg" ).hide( );
302 //reset value since user don't want or not eligible for waitlist
303 cj( "#bypass_payment").val( 0 );
305 //need to show paylater if exists.
306 {/literal}{if $form.is_pay_later}{literal}
307 cj("#is-pay-later").show( );
308 {/literal} {/if}{literal}
311 //now call showhide payment info.
313 {if ($form.is_pay_later or $bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}{literal}
314 showHidePayPalExpressOption( );
318 {/literal}{if ($form.is_pay_later or $bypassPayment) and $showHidePaymentInformation}{literal}
319 showHidePaymentInfo( );
320 {/literal}{/if}{literal}
323 {/literal}{if $pcp && $is_honor_roll }{literal}
324 function pcpAnonymous( ) {
325 // clear nickname field if anonymous is true
326 if ( document.getElementsByName("pcp_is_anonymous")[1].checked ) {
327 document.getElementById('pcp_roll_nickname').value = '';
329 if ( ! document.getElementsByName("pcp_display_in_roll")[0].checked ) {
330 cj('#nickID, #nameID, #personalNoteID').hide();
332 if ( document.getElementsByName("pcp_is_anonymous")[0].checked ) {
333 cj('#nameID, #nickID, #personalNoteID').show();
335 cj('#nameID').show();
336 cj('#nickID, #personalNoteID').hide();
340 {/literal}{/if}{literal}