Merge branch 'CRM-13965' of git://github.com/pratik-joshi/civicrm-core into CRM-13965
[civicrm-core.git] / templates / CRM / Event / Form / Participant.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {* This template is used for adding/editing/deleting offline Event Registrations *}
27 {if $showFeeBlock}
28 {if $priceSet}
29 <div id='validate_pricefield' class='messages crm-error hiddenElement'></div>
30 {literal}
31 <script type="text/javascript">
32
33 var fieldOptionsFull = new Array( );
34 {/literal}
35 {foreach from=$priceSet.fields item=fldElement key=fldId}
36 {if $fldElement.options}
37 {foreach from=$fldElement.options item=fldOptions key=opId}
38 {if $fldOptions.is_full}
39 {literal}
40 fieldOptionsFull[{/literal}{$fldId}{literal}] = new Array( );
41 fieldOptionsFull[{/literal}{$fldId}{literal}][{/literal}{$opId}{literal}] = 1;
42 {/literal}
43 {/if}
44 {/foreach}
45 {/if}
46 {/foreach}
47 {literal}
48
49 if ( fieldOptionsFull.length > 0 ) {
50 cj(function() {
51 cj("input,#priceset select,#priceset").each(function () {
52 if ( cj(this).attr('price') ) {
53 switch( cj(this).attr('type') ) {
54 case 'checkbox':
55 case 'radio':
56 cj(this).click( function() {
57 validatePriceField(this);
58 });
59 break;
60
61 case 'select-one':
62 cj(this).change( function() {
63 validatePriceField(this);
64 });
65 break;
66 case 'text':
67 cj(this).bind( 'keyup', function() { validatePriceField(this) });
68 break;
69 }
70 }
71 });
72 });
73
74 function validatePriceField( obj ) {
75 var namePart = cj(obj).attr('name').split('_');
76 var fldVal = cj(obj).val();
77 if ( cj(obj).attr('type') == 'checkbox') {
78 var eleIdpart = namePart[1].split('[');
79 var eleId = eleIdpart[0];
80 }
81 else {
82 var eleId = namePart[1];
83 }
84 var showError = false;
85
86 switch( cj(obj).attr('type') ) {
87 case 'text':
88 if ( fieldOptionsFull[eleId] && fldVal ) {
89 showError = true;
90 cj(obj).parent( ).parent( ).children('.label').addClass('crm-error');
91 }
92 else {
93 cj(obj).parent( ).parent( ).children('.label').removeClass('crm-error');
94 cj('#validate_pricefield').hide( ).html('');
95 }
96 break;
97
98 case 'checkbox':
99 var checkBoxValue = eleIdpart[1].split(']');
100 if ( cj(obj).prop("checked") == true &&
101 fieldOptionsFull[eleId] &&
102 fieldOptionsFull[eleId][checkBoxValue[0]]) {
103 showError = true;
104 cj(obj).parent( ).addClass('crm-error');
105 }
106 else {
107 cj(obj).parent( ).removeClass('crm-error');
108 }
109 break;
110
111 default:
112 if ( fieldOptionsFull[eleId] &&
113 fieldOptionsFull[eleId][fldVal] ) {
114 showError = true;
115 cj(obj).parent( ).addClass('crm-error');
116 }
117 else {
118 cj(obj).parent( ).removeClass('crm-error');
119 }
120 }
121
122 if ( showError ) {
123 cj('#validate_pricefield').show().html("<span class='icon red-icon alert-icon'></span>{/literal}{ts escape='js'}This Option is already full for this event.{/ts}{literal}");
124 }
125 else {
126 cj('#validate_pricefield').hide( ).html('');
127 }
128 }
129 }
130
131 // change the status to default 'partially paid' for partial payments
132 var feeAmount;
133 var userModifiedAmount;
134
135 cj('#total_amount')
136 .focus(
137 function() {
138 feeAmount = cj(this).val();
139 feeAmount = parseInt(feeAmount);
140 }
141 )
142 .change(
143 function() {
144 userModifiedAmount = cj(this).val();
145 userModifiedAmount = parseInt(userModifiedAmount);
146 if (userModifiedAmount < feeAmount) {
147 cj('#status_id').val(CRM.partiallyPaidStatusId);
148 }
149 }
150 );
151
152 cj('#Participant').submit(
153 function(e) {
154 var userSubmittedStatus = cj('#status_id').val();
155 var statusLabel = cj('#status_id option:selected').text();
156 if (userModifiedAmount < feeAmount && userSubmittedStatus != CRM.partiallyPaidStatusId) {
157 var result = confirm('Payment amount is less than the amount owed. Expected participant status is \'Partially paid\'. Are you sure you want to set the participant status to ' + statusLabel + '? Click OK to continue, Cancel to change your entries.');
158 if (result == false) {
159 e.preventDefault();
160 }
161 }
162 }
163 );
164 </script>
165 {/literal}
166 {/if}
167 {if $participantId}
168 {include file="CRM/Contribute/Page/PaymentInfo.tpl" show='event-payment'}
169 {/if}
170 {include file="CRM/Event/Form/EventFees.tpl"}
171 {elseif $cdType}
172 {include file="CRM/Custom/Form/CustomData.tpl"}
173 {else}
174 {if $participantMode == 'test' }
175 {assign var=registerMode value="TEST"}
176 {elseif $participantMode == 'live'}
177 {assign var=registerMode value="LIVE"}
178 {/if}
179 <h3>{if $action eq 1}{ts}New Event Registration{/ts}{elseif $action eq 8}{ts}Delete Event Registration{/ts}{else}{ts}Edit Event Registration{/ts}{/if}</h3>
180 <div class="crm-block crm-form-block crm-participant-form-block">
181 <div class="view-content">
182 {if $participantMode}
183 <div id="help">
184 {ts 1=$displayName 2=$registerMode}Use this form to submit an event registration on behalf of %1. <strong>A %2 transaction will be submitted</strong> using the selected payment processor.{/ts}
185 </div>
186 {/if}
187 <div id="eventFullMsg" class="messages status no-popup" style="display:none;"></div>
188
189
190 {if $action eq 1 AND $paid}
191 <div id="help">
192 {ts}If you are accepting offline payment from this participant, check <strong>Record Payment</strong>. You will be able to fill in the payment information, and optionally send a receipt.{/ts}
193 </div>
194 {/if}
195
196 {if $action eq 8} {* If action is Delete *}
197 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
198 <div class="crm-participant-form-block-delete messages status no-popup">
199 <div class="crm-content">
200 <div class="icon inform-icon"></div> &nbsp;
201 {ts}WARNING: Deleting this registration will result in the loss of related payment records (if any).{/ts} {ts}Do you want to continue?{/ts}
202 </div>
203 {if $additionalParticipant}
204 <div class="crm-content">
205 {ts 1=$additionalParticipant} There are %1 more Participant(s) registered by this participant.{/ts}
206 </div>
207 {/if}
208 </div>
209 {if $additionalParticipant}
210 {$form.delete_participant.html}
211 {/if}
212 {else} {* If action is other than Delete *}
213 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
214 <table class="form-layout-compressed">
215 {if $single and $context neq 'standalone'}
216 <tr class="crm-participant-form-block-displayName">
217 <td class="label font-size12pt"><label>{ts}Participant{/ts}</label></td>
218 <td class="font-size12pt view-value">{$displayName}&nbsp;</td>
219 </tr>
220 {else}
221 {if !$participantMode and !$email and $outBound_option != 2 }
222 {assign var='profileCreateCallback' value=1}
223 {/if}
224 {include file="CRM/Contact/Form/NewContact.tpl"}
225 {/if}
226 {if $action EQ 2}
227 {if $additionalParticipants} {* Display others registered by this participant *}
228 <tr class="crm-participant-form-block-additionalParticipants">
229 <td class="label"><label>{ts}Also Registered by this Participant{/ts}</label></td>
230 <td>
231 {foreach from=$additionalParticipants key=apName item=apURL}
232 <a href="{$apURL}" title="{ts}view additional participant{/ts}">{$apName}</a><br />
233 {/foreach}
234 </td>
235 </tr>
236 {/if}
237 {if $registered_by_contact_id}
238 <tr class="crm-participant-form-block-registered-by">
239 <td class="label"><label>{ts}Registered By{/ts}</label></td>
240 <td class="view-value">
241 <a href="{crmURL p='civicrm/contact/view/participant' q="reset=1&id=$participant_registered_by_id&cid=$registered_by_contact_id&action=view"}"
242 title="{ts}view primary participant{/ts}">{$registered_by_display_name}</a>
243 </td>
244 </tr>
245 {/if}
246 {/if}
247 {if $participantMode}
248 <tr class="crm-participant-form-block-payment_processor_id">
249 <td class="label nowrap">{$form.payment_processor_id.label}</td>
250 <td>{$form.payment_processor_id.html}</td>
251 </tr>
252 {/if}
253 <tr class="crm-participant-form-block-event_id">
254 <td class="label">{$form.event_id.label}</td><td class="view-value bold">{$form.event_id.html}&nbsp;
255 {if $action eq 1}<span id='past-event-section'>
256 <br />&raquo; <span id="showing-event-info"></span>
257 {/if}
258 {if $is_test}
259 {ts}(test){/ts}
260 {/if}
261 </td>
262 </tr>
263
264 {* CRM-7362 --add campaign *}
265 {include file="CRM/Campaign/Form/addCampaignToComponent.tpl"
266 campaignTrClass="crm-participant-form-block-campaign_id"}
267
268 <tr class="crm-participant-form-block-role_id">
269 <td class="label">{$form.role_id.label}</td>
270 <td>{$form.role_id.html}</td>
271 </tr>
272 <tr class="crm-participant-form-block-register_date">
273 <td class="label">{$form.register_date.label}</td>
274 <td>
275 {if $hideCalendar neq true}
276 {include file="CRM/common/jcalendar.tpl" elementName=register_date}
277 {else}
278 {$form.register_date.html|crmDate}
279 {/if}
280 </td>
281 </tr>
282 <tr class="crm-participant-form-block-status_id">
283 <td class="label">{$form.status_id.label}</td>
284 <td>{$form.status_id.html}{if $event_is_test} {ts}(test){/ts}{/if}
285 <div id="notify">{$form.is_notify.html}{$form.is_notify.label}</div>
286 </td>
287 </tr>
288 <tr class="crm-participant-form-block-source">
289 <td class="label">{$form.source.label}</td><td>{$form.source.html|crmAddClass:huge}<br />
290 <span class="description">{ts}Source for this registration (if applicable).{/ts}</span></td>
291 </tr>
292 </table>
293 {if $participantId}
294 <table class='form-layout'>
295 <tr>
296 <td class='label'>{ts}Fees{/ts}</td>
297 {* this is where the payment info is shown using CRM/Contribute/Page/PaymentInfo.tpl tpl*}
298 <td id='payment-info'></td>
299 </tr>
300 </table>
301 {/if}
302 {* Fee block (EventFees.tpl) is injected here when an event is selected. *}
303 <div id="feeBlock"></div>
304 <fieldset>
305 <table class="form-layout">
306 <tr class="crm-participant-form-block-note">
307 <td class="label">{$form.note.label}</td><td>{$form.note.html}</td>
308 </tr>
309 </table>
310 </fieldset>
311
312 <div class="crm-participant-form-block-customData">
313 <div id="customData" class="crm-customData-block"></div> {* Participant Custom data *}
314 <div id="customData{$eventNameCustomDataTypeID}" class="crm-customData-block"></div> {* Event Custom Data *}
315 <div id="customData{$roleCustomDataTypeID}" class="crm-customData-block"></div> {* Role Custom Data *}
316 <div id="customData{$eventTypeCustomDataTypeID}" class="crm-customData-block"></div> {* Role Custom Data *}
317 </div>
318 {/if}
319
320 {if $accessContribution and $action eq 2 and $rows.0.contribution_id}
321 {include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
322 {/if}
323
324 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
325 </div>
326 </div>
327 {if $action eq 1 or $action eq 2}
328 {literal}
329 <script type="text/javascript">
330 // event select
331 function buildSelect( selectID, listallVal ) {
332 var elementID = '#' + selectID;
333 cj( elementID ).html('');
334 var postUrl = "{/literal}{crmURL p='civicrm/ajax/eventlist' h=0}{literal}";
335 cj.post( postUrl, {listall:listallVal}, function ( response ) {
336 response = eval( response );
337 for (i = 0; i < response.length; i++) {
338 cj( elementID ).get(0).add(new Option(response[i].name, response[i].value), document.all ? i : null);
339 }
340 getShowEventInfo(listallVal);
341 cj('input[name="past_event"]').val(listallVal);
342 cj("#feeBlock").html( '' );
343 });
344 }
345
346 {/literal}
347 {if $action eq 1}getShowEventInfo({$past});{/if}
348 {literal}
349
350 function getShowEventInfo (listallVal) {
351 switch(listallVal) {
352 case 1:
353 cj('#showing-event-info').html({/literal}'{ts}Showing all events: show{/ts}'{literal}+' <a href="#" onclick="buildSelect(\'event_id\', 0); return false;">'+{/literal}'{ts}current and future{/ts}'{literal}+'</a> | <a href="#" onclick="buildSelect(\'event_id\', 2); return false;">'+{/literal}'{ts}past three months{/ts}'{literal}+'</a>');
354 break;
355 case 2:
356 cj('#showing-event-info').html({/literal}'{ts}Showing events since three months ago: show{/ts}'{literal}+' <a href="#" onclick="buildSelect(\'event_id\', 0); return false;">'+{/literal}'{ts}current and future{/ts}'{literal}+'</a> | <a href="#" onclick="buildSelect(\'event_id\', 1); return false;">'+{/literal}'{ts}all{/ts}'{literal}+'</a>');
357 break;
358 default:
359 cj('#showing-event-info').html({/literal}'{ts}Showing current and future events: show{/ts}'{literal}+' <a href="#" onclick="buildSelect(\'event_id\', 2); return false;">'+{/literal}'{ts}past three months{/ts}'{literal}+'</a> | <a href="#" onclick="buildSelect(\'event_id\', 1); return false;">'+{/literal}'{ts}all{/ts}'{literal}+'</a>');
360 break;
361 }
362 }
363 {/literal}
364
365 {if $preloadJSSnippet}
366 {$preloadJSSnippet}
367 {else}
368 //build fee block
369 buildFeeBlock( );
370 {/if}
371
372 {literal}
373 //build discount block
374 if ( document.getElementById('discount_id') ) {
375 var discountId = document.getElementById('discount_id').value;
376 if ( discountId ) {
377 var eventId = document.getElementById('event_id').value;
378 buildFeeBlock( eventId, discountId );
379 }
380 }
381
382 function buildFeeBlock( eventId, discountId ) {
383 var dataUrl = {/literal}"{crmURL p=$urlPath h=0 q='snippet=4'}";
384 dataUrl = dataUrl + '&qfKey=' + '{$qfKey}'
385
386 {if $urlPathVar}
387 dataUrl = dataUrl + '&' + '{$urlPathVar}'
388 {/if}
389
390 {literal}
391 if ( !eventId ) {
392 var eventId = document.getElementById('event_id').value;
393 }
394
395 if ( eventId) {
396 dataUrl = dataUrl + '&eventId=' + eventId;
397 }
398 else {
399 cj('#eventFullMsg').hide( );
400 cj('#feeBlock').html('');
401 return;
402 }
403
404 var participantId = "{/literal}{$participantId}{literal}";
405
406 if ( participantId ) {
407 dataUrl = dataUrl + '&participantId=' + participantId;
408 }
409
410 if ( discountId ) {
411 dataUrl = dataUrl + '&discountId=' + discountId;
412 }
413
414 cj.ajax({
415 url: dataUrl,
416 async: false,
417 global: false,
418 success: function ( html ) {
419 cj("#feeBlock").html( html );
420 }
421 });
422
423 cj("#feeBlock").ajaxStart(function(){
424 cj(".disable-buttons input").prop('disabled', true);
425 });
426
427 cj("#feeBlock").ajaxStop(function(){
428 cj(".disable-buttons input").prop('disabled', false);
429 });
430
431 //show event real full as well as waiting list message.
432 if ( cj("#hidden_eventFullMsg").val( ) ) {
433 cj( "#eventFullMsg" ).show( ).html( cj("#hidden_eventFullMsg" ).val( ) );
434 }
435 else {
436 cj( "#eventFullMsg" ).hide( );
437 }
438 }
439
440 </script>
441 {/literal}
442
443 {*include custom data js file*}
444 {include file="CRM/common/customData.tpl"}
445 {literal}
446 <script type="text/javascript">
447 var roleGroupMapper = new Array( );
448 {/literal}
449 {foreach from=$participantRoleIds item="grps" key="rlId"}
450 {literal}
451 roleGroupMapper[{/literal}{$rlId}{literal}] = '{/literal}{$grps}{literal}';
452 {/literal}
453 {/foreach}
454 {literal}
455
456 function buildParticipantRole( eventID ) {
457 var dataUrl = "{/literal}{crmURL p='civicrm/ajax/rest' q='className=CRM_Event_Page_AJAX&fnName=participantRole&json=1&context=participant' h=0 }"{literal};
458
459 if ( !eventId ) {
460 var eventId = document.getElementById( 'event_id' ).value;
461 }
462
463 if ( eventId ) {
464 dataUrl = dataUrl + '&eventId=' + eventID;
465 }
466
467 cj.ajax({
468 url: dataUrl,
469 async: false,
470 global: false,
471 dataType: "json",
472 success: function ( response ) {
473 if ( response.role ) {
474 for ( var i in roleGroupMapper ) {
475 if ( i != 0 ) {
476 if ( i == response.role ) {
477 document.getElementById("role_id_" +i ).checked = true;
478 }
479 else {
480 document.getElementById("role_id_" +i ).checked = false;
481 }
482 showCustomData( 'Participant', i, {/literal} {$roleCustomDataTypeID} {literal} );
483 }
484 }
485 }
486 }
487 });
488 }
489
490 function showCustomData( type, subType, subName ) {
491 var dataUrl = {/literal}"{crmURL p=$urlPath h=0 q='snippet=4&type='}"{literal} + type;
492 var roleid = "role_id_"+subType;
493 var loadData = false;
494
495 if ( document.getElementById( roleid ).checked == true ) {
496 if ( roleGroupMapper[subType] ) {
497 var splitGroup = roleGroupMapper[subType].split(",");
498 for ( i = 0; i < splitGroup.length; i++ ) {
499 var roleCustomGroupId = splitGroup[i];
500 if ( cj( '#'+roleCustomGroupId ).length > 0 ) {
501 cj( '#'+roleCustomGroupId ).remove( );
502 }
503 }
504 loadData = true;
505 }
506 }
507 else {
508 var groupUnload = new Array( );
509 var x = 0;
510
511 if ( roleGroupMapper[0] ) {
512 var splitGroup = roleGroupMapper[0].split(",");
513 for ( x = 0; x < splitGroup.length; x++ ) {
514 groupUnload[x] = splitGroup[x];
515 }
516 }
517
518 for ( var i in roleGroupMapper ) {
519 if ( ( i > 0 ) && ( document.getElementById( "role_id_"+i ).checked ) ) {
520 var splitGroup = roleGroupMapper[i].split(",");
521 for ( j = 0; j < splitGroup.length; j++ ) {
522 groupUnload[x+j+1] = splitGroup[j];
523 }
524 }
525 }
526
527 if ( roleGroupMapper[subType] ) {
528 var splitGroup = roleGroupMapper[subType].split(",");
529 for ( i = 0; i < splitGroup.length; i++ ) {
530 var roleCustomGroupId = splitGroup[i];
531 if ( cj( '#'+roleCustomGroupId ).length > 0 ) {
532 if ( cj.inArray( roleCustomGroupId, groupUnload ) == -1 ) {
533 cj( '#'+roleCustomGroupId ).remove( );
534 }
535 }
536 }
537 }
538 }
539
540 if ( !( loadData ) ) {
541 return false;
542 }
543
544 if ( subType ) {
545 dataUrl = dataUrl + '&subType=' + subType;
546 }
547
548 if ( subName ) {
549 dataUrl = dataUrl + '&subName=' + subName;
550 cj( '#customData' + subName ).show( );
551 }
552 else {
553 cj( '#customData' ).show( );
554 }
555
556 {/literal}
557 {if $urlPathVar}
558 dataUrl = dataUrl + '&' + '{$urlPathVar}'
559 {/if}
560 {if $groupID}
561 dataUrl = dataUrl + '&groupID=' + '{$groupID}'
562 {/if}
563 {if $qfKey}
564 dataUrl = dataUrl + '&qfKey=' + '{$qfKey}'
565 {/if}
566 {if $entityID}
567 dataUrl = dataUrl + '&entityID=' + '{$entityID}'
568 {/if}
569
570 {literal}
571
572 if ( subName && subName != 'null' ) {
573 var fname = '#customData' + subName;
574 }
575 else {
576 var fname = '#customData';
577 }
578
579 var response = cj.ajax({url: dataUrl,
580 async: false
581 }).responseText;
582
583 if ( subType != 'null' ) {
584 if ( document.getElementById(roleid).checked == true ) {
585 var response_text = '<div style="display:block;" id = '+subType+'_chk >'+response+'</div>';
586 cj( fname ).append(response_text);
587 }
588 else {
589 cj('#'+subType+'_chk').remove();
590 }
591 }
592 }
593
594 cj(function() {
595 {/literal}
596 CRM.buildCustomData( '{$customDataType}', 'null', 'null' );
597 {literal}
598 for ( var i in roleGroupMapper ) {
599 if ( ( i > 0 ) && ( document.getElementById( "role_id_"+i ).checked ) ) {
600 {/literal}
601 showCustomData( '{$customDataType}', i, {$roleCustomDataTypeID} );
602 {literal}
603 }
604 }
605 {/literal}
606 {if $eventID}
607 CRM.buildCustomData( '{$customDataType}', {$eventID}, {$eventNameCustomDataTypeID} );
608 {/if}
609 {if $eventTypeID}
610 CRM.buildCustomData( '{$customDataType}', {$eventTypeID}, {$eventTypeCustomDataTypeID} );
611 {/if}
612 {literal}
613
614 //call pane js
615 cj().crmAccordions();
616 });
617 </script>
618 {/literal}
619
620 {/if}
621
622 {* include jscript to warn if unsaved form field changes *}
623 {include file="CRM/common/formNavigate.tpl"}
624
625 <script type="text/javascript">
626 {literal}
627
628 sendNotification();
629 function sendNotification() {
630 var notificationStatusIds = {/literal}"{$notificationStatusIds}"{literal};
631 notificationStatusIds = notificationStatusIds.split(',');
632 if (cj.inArray(cj('select#status_id option:selected').val(), notificationStatusIds) > -1) {
633 cj("#notify").show();
634 cj("#is_notify").prop('checked', true);
635 }
636 else {
637 cj("#notify").hide();
638 cj("#is_notify").prop('checked', false);
639 }
640 }
641
642 function buildEventTypeCustomData( eventID, eventTypeCustomDataTypeID, eventAndTypeMapping ) {
643 var mapping = eval('(' + eventAndTypeMapping + ')');
644 CRM.buildCustomData( 'Participant', mapping[eventID], eventTypeCustomDataTypeID );
645 }
646
647 function loadCampaign( eventId, campaigns ) {
648 cj( "#campaign_id" ).val( campaigns[eventId] );
649 }
650
651 {/literal}
652 {if $profileCreateCallback}
653 {literal}
654 function profileCreateCallback( blockNo ) {
655 if( cj('#event_id').val( ) && cj('#email-receipt').length > 0 ) {
656 checkEmail( );
657 }
658 }
659 {/literal}
660 {/if}
661 </script>
662 {literal}
663 <script type="text/javascript">
664 cj(function() {
665 cj().crmAccordions();
666 });
667 </script>
668 {/literal}
669
670 {/if} {* end of main event block*}
671