2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 +--------------------------------------------------------------------+
26 {if $addProfileBottomAdd OR $addProfileBottom}
27 <td scope="row" class="label"
28 width="20%">{if $addProfileBottomAdd }{$form.additional_custom_post_id_multiple[$profileBottomNumAdd].label}
29 {else}{$form.custom_post_id[$profileBottomNum].label}{/if}</td>
30 <td>{if $addProfileBottomAdd }{$form.additional_custom_post_id_multiple[$profileBottomNumAdd].html}{else}{$form.custom_post_id_multiple[$profileBottomNum].html}{/if}
31 <span class='profile_bottom_link_remove'><a href="#" class="crm-hover-button crm-button-rem-profile"
32 data-addtlPartc="{$addProfileBottomAdd}"><span
33 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span> <span
34 class='profile_bottom_link'> <a href="#" class="crm-hover-button crm-button-add-profile"><span
35 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
37 {if $addProfileBottomAdd }
39 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
42 class="description">{ts}Include additional fields on this registration form by configuring and selecting a CiviCRM Profile to be included at the bottom of the page.{/ts}</span>
44 <br/><span class="profile-links"></span>
47 {assign var=eventID value=$id}
49 {ts}If you want to provide an Online Registration page for this event, check the first box below and then complete the fields on this form.{/ts}
50 {help id="id-event-reg"}
52 <div class="crm-block crm-form-block crm-event-manage-registration-form-block">
53 <div class="crm-submit-buttons">
54 {include file="CRM/common/formButtons.tpl" location="top"}
58 <table class="form-layout">
59 <tr class="crm-event-manage-registration-form-block-is_online_registration">
60 <td class="label">{$form.is_online_registration.label}</td>
61 <td>{$form.is_online_registration.html}
62 <span class="description">{ts}Online registration enabled?{/ts}</span>
67 <div class="spacer"></div>
68 <div id="registration_blocks">
69 <table class="form-layout-compressed">
71 <tr class="crm-event-manage-registration-form-block-registration_link_text">
72 <td scope="row" class="label"
73 width="20%">{$form.registration_link_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='registration_link_text' id=$eventID}{/if}</td>
74 <td>{$form.registration_link_text.html} {help id="id-link_text"}</td>
77 <tr class="crm-event-manage-registration-form-block-registration_start_date">
78 <td scope="row" class="label" width="20%">{$form.registration_start_date.label}</td>
79 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_start_date}</td>
81 <tr class="crm-event-manage-registration-form-block-registration_end_date">
82 <td scope="row" class="label" width="20%">{$form.registration_end_date.label}</td>
83 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_end_date}</td>
86 <tr class="crm-event-manage-registration-form-block-is_multiple_registrations">
87 <td scope="row" class="label" width="20%">{$form.is_multiple_registrations.label}</td>
88 <td>{$form.is_multiple_registrations.html} {help id="id-allow_multiple"}</td>
90 <tr class="crm-event-manage-registration-form-block-allow_same_participant_emails">
91 <td scope="row" class="label" width="20%">{$form.allow_same_participant_emails.label}</td>
92 <td>{$form.allow_same_participant_emails.html} {help id="id-allow_same_email"}</td>
94 <tr class="crm-event-manage-registration-form-block-requires_approval">
95 {if $form.requires_approval}
96 <td scope="row" class="label" width="20%">{$form.requires_approval.label}</td>
97 <td>{$form.requires_approval.html} {help id="id-requires_approval"}</td>
100 <tr id="id-approval-text" class="crm-event-manage-registration-form-block-approval_req_text">
101 {if $form.approval_req_text}
102 <td scope="row" class="label"
103 width="20%">{$form.approval_req_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='approval_req_text' id=$eventID}{/if}</td>
104 <td>{$form.approval_req_text.html}</td>
107 <tr class="crm-event-manage-registration-form-block-expiration_time">
108 <td scope="row" class="label" width="20%">{$form.expiration_time.label}</td>
109 <td>{$form.expiration_time.html|crmAddClass:four} {help id="id-expiration_time"}</td>
112 <div class="spacer"></div>
114 {*Registration Block*}
115 <fieldset id="registration" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
116 <legend class="collapsible-title">{ts}Registration Screen{/ts}</legend>
117 <div id="registration_screen">
118 <table class="form-layout-compressed">
119 <tr class="crm-event-manage-registration-form-block-intro_text">
120 <td scope="row" class="label"
121 width="20%">{$form.intro_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='intro_text' id=$eventID}{/if}</td>
122 <td>{$form.intro_text.html}
124 class="description">{ts}Introductory message / instructions for online event registration page (may include HTML formatting tags).{/ts}</div>
127 <tr class="crm-event-manage-registration-form-block-footer_text">
128 <td scope="row" class="label"
129 width="20%">{$form.footer_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='footer_text' id=$eventID}{/if}</td>
130 <td>{$form.footer_text.html}
131 <div class="description">{ts}Optional footer text for registration screen.{/ts}</div>
135 <table class="form-layout-compressed">
136 <tr class="crm-event-manage-registration-form-block-custom_pre_id">
137 <td scope="row" class="label" width="20%">{$form.custom_pre_id.label}</td>
138 <td>{$form.custom_pre_id.html}<br/>
140 class="description">{ts}Include additional fields on this registration form by configuring and selecting a CiviCRM Profile to be included at the top of the page (immediately after the introductory message).{/ts}{help id="event-profile"}</span><br/>
143 <tr id="profile_post" class="crm-event-manage-registration-form-block-custom_post_id">
144 <td scope="row" class="label" width="20%">{$form.custom_post_id.label}</td>
145 <td>{$form.custom_post_id.html}
146 <span class='profile_bottom_link_main {if $profilePostMultiple}hiddenElement{/if}'> <a href="#"
147 class="crm-hover-button crm-button-add-profile"><span
148 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
151 class="description">{ts}Include additional fields on this registration form by configuring and selecting a CiviCRM Profile to be included at the bottom of the page.{/ts}</span>
155 {if $profilePostMultiple}
156 {foreach from=$profilePostMultiple item=profilePostId key=profilePostNum name=profilePostIdName}
157 <tr id="custom_post_id_multiple_{$profilePostNum}_wrapper"
158 class='crm-event-manage-registration-form-block-custom_post_multiple'>
159 <td scope="row" class="label" width="20%">{$form.custom_post_id_multiple.$profilePostNum.label}</td>
160 <td>{$form.custom_post_id_multiple.$profilePostNum.html}
161 <span class='profile_bottom_link_remove'><a href="#"
162 class="crm-hover-button crm-button-rem-profile"><span
163 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
164 {if $smarty.foreach.profilePostIdName.last}
166 <span class='profile_bottom_link'><a href="#" class="crm-hover-button crm-button-add-profile"><span
167 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
169 <br/><span class="profile-links"></span>
175 <table class="form-layout-compressed">
176 <tr id="additional_profile_pre" class="crm-event-manage-registration-form-block-additional_custom_pre_id">
177 <td scope="row" class="label" width="20%">{$form.additional_custom_pre_id.label}</td>
178 <td>{$form.additional_custom_pre_id.html}<br/>
180 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
181 <br/><span class="profile-links"></span>
184 <tr id="additional_profile_post" class="crm-event-manage-registration-form-block-additional_custom_post_id">
185 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id.label}</td>
186 <td>{$form.additional_custom_post_id.html}
187 <span class='profile_bottom_add_link_main {if $profilePostMultipleAdd}hiddenElement{/if}'><a
188 href="#" class="crm-hover-button crm-button-add-profile"><span
189 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
192 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
193 <br/><span class="profile-links"></span>
196 {if $profilePostMultipleAdd}
197 {foreach from=$profilePostMultipleAdd item=profilePostIdA key=profilePostNumA name=profilePostIdAName}
198 <tr id='additional_custom_post_id_multiple_{$profilePostNumA}_wrapper'
199 class='crm-event-manage-registration-form-block-additional_custom_post_multiple'>
200 <td scope="row" class="label"
201 width="20%">{$form.additional_custom_post_id_multiple.$profilePostNumA.label}</td>
202 <td>{$form.additional_custom_post_id_multiple.$profilePostNumA.html}
203 <span class='profile_bottom_add_link_remove'><a href="#"
204 class="crm-hover-button crm-button-rem-profile"><span
205 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
206 {if $smarty.foreach.profilePostIdAName.last}
208 <span class='profile_bottom_add_link'><a href="#"
209 class="crm-hover-button crm-button-add-profile"><span
210 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
212 <br/><span class="profile-links"></span>
221 {*Confirmation Block*}
222 <fieldset id="confirm" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
223 <legend class="collapsible-title">{ts}Confirmation Screen{/ts}</legend>
224 <table class="form-layout-compressed">
225 <tr class="crm-event-manage-registration-form-block-is_confirm_enabled">
226 <td scope="row" class="label" width="20%">{$form.is_confirm_enabled.label}</td>
227 <td>{$form.is_confirm_enabled.html}
228 <div class="description">{ts}Optionally hide the confirmation screen for free events.{/ts}</div>
233 <div id="confirm_screen_settings">
234 <table class="form-layout-compressed">
235 <tr class="crm-event-manage-registration-form-block-confirm_title">
236 <td scope="row" class="label" width="20%">{$form.confirm_title.label} <span
237 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_title' id=$eventID}{/if}
239 <td>{$form.confirm_title.html}<br/>
241 class="description">{ts}Page title for screen where user reviews and confirms their registration information.{/ts}</span>
244 <tr class="crm-event-manage-registration-form-block-confirm_text">
245 <td scope="row" class="label"
246 width="20%">{$form.confirm_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_text' id=$eventID}{/if}</td>
247 <td>{$form.confirm_text.html}
248 <div class="description">{ts}Optional instructions / message for Confirmation screen.{/ts}</div>
251 <tr class="crm-event-manage-registration-form-block-confirm_footer_text">
252 <td scope="row" class="label"
253 width="20%">{$form.confirm_footer_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_footer_text' id=$eventID}{/if}</td>
254 <td>{$form.confirm_footer_text.html}
255 <div class="description">{ts}Optional page footer text for Confirmation screen.{/ts}</div>
263 <fieldset id="thankyou" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
264 <legend class="collapsible-title">{ts}Thank-you Screen{/ts}</legend>
265 <table class="form-layout-compressed">
266 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_title">
267 <td scope="row" class="label" width="20%">{$form.thankyou_title.label} <span
268 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_title' id=$eventID}{/if}
270 <td>{$form.thankyou_title.html}
271 <div class="description">{ts}Page title for registration Thank-you screen.{/ts}</div>
274 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_text">
275 <td scope="row" class="label"
276 width="20%">{$form.thankyou_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_text' id=$eventID}{/if}</td>
277 <td>{$form.thankyou_text.html}
279 class="description">{ts}Optional message for Thank-you screen (may include HTML formatting).{/ts}</div>
282 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_footer_text">
283 <td scope="row" class="label"
284 width="20%">{$form.thankyou_footer_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_footer_text' id=$eventID}{/if}</td>
285 <td>{$form.thankyou_footer_text.html}
287 class="description">{ts}Optional footer text for Thank-you screen (often used to include links to other pages/activities on your site).{/ts}</div>
293 {* Confirmation Email Block *}
294 <fieldset id="mail" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
295 <legend class="collapsible-title">{ts}Confirmation Email{/ts}</legend>
297 <table class="form-layout-compressed">
298 <tr class="crm-event-manage-registration-form-block-is_email_confirm">
299 <td scope="row" class="label" width="20%">{$form.is_email_confirm.label}</td>
300 <td>{$form.is_email_confirm.html}<br/>
302 class="description">{ts}Do you want a registration confirmation email sent automatically to the user? This email includes event date(s), location and contact information. For paid events, this email is also a receipt for their payment.{/ts}</span>
306 <div id="confirmEmail">
307 <table class="form-layout-compressed">
308 <tr class="crm-event-manage-registration-form-block-confirm_email_text">
309 <td scope="row" class="label"
310 width="20%">{$form.confirm_email_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_email_text' id=$eventID}{/if}</td>
311 <td>{$form.confirm_email_text.html}<br/>
313 class="description">{ts}Additional message or instructions to include in confirmation email.{/ts}</span>
316 <tr class="crm-event-manage-registration-form-block-confirm_from_name">
317 <td scope="row" class="label" width="20%">{$form.confirm_from_name.label} <span
318 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_from_name' id=$eventID}{/if}
320 <td>{$form.confirm_from_name.html}<br/>
321 <span class="description">{ts}FROM name for email.{/ts}</span>
324 <tr class="crm-event-manage-registration-form-block-confirm_from_email">
325 <td scope="row" class="label" width="20%">{$form.confirm_from_email.label} <span class="marker">*</span></td>
326 <td>{$form.confirm_from_email.html}<br/>
328 class="description">{ts}FROM email address (this must be a valid email account with your SMTP email service provider).{/ts}</span>
331 <tr class="crm-event-manage-registration-form-block-cc_confirm">
332 <td scope="row" class="label" width="20%">{$form.cc_confirm.label}</td>
333 <td>{$form.cc_confirm.html}<br/>
335 class="description">{ts}You can notify event organizers of each online registration by specifying one or more email addresses to receive a carbon copy (cc). Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts}</span>
338 <tr class="crm-event-manage-registration-form-block-bcc_confirm">
339 <td scope="row" class="label" width="20%">{$form.bcc_confirm.label}</td>
340 <td>{$form.bcc_confirm.html}<br/>
342 class="description">{ts}You may specify one or more email addresses to receive a blind carbon copy (bcc) of the confirmation email. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts}</span>
349 </div> {*end of div registration_blocks*}
351 <div class="crm-submit-buttons">
352 {include file="CRM/common/formButtons.tpl" location="bottom"}
354 {include file="CRM/common/showHide.tpl"}
355 {include file="CRM/common/showHideByFieldValue.tpl"
356 trigger_field_id ="is_online_registration"
358 target_element_id ="registration_blocks"
359 target_element_type ="block"
364 {include file="CRM/common/showHideByFieldValue.tpl"
365 trigger_field_id ="is_confirm_enabled"
367 target_element_id ="confirm_screen_settings"
368 target_element_type ="block"
373 {include file="CRM/common/showHideByFieldValue.tpl"
374 trigger_field_id ="is_email_confirm"
376 target_element_id ="confirmEmail"
377 target_element_type ="block"
381 {include file="CRM/common/showHideByFieldValue.tpl"
382 trigger_field_id ="is_multiple_registrations"
384 target_element_id ="additional_profile_pre|additional_profile_post"
385 target_element_type ="table-row"
389 {if $form.requires_approval}
390 {include file="CRM/common/showHideByFieldValue.tpl"
391 trigger_field_id ="requires_approval"
393 target_element_id ="id-approval-text"
394 target_element_type ="table-row"
400 {*include profile link function*}
401 {include file="CRM/common/buildProfileLink.tpl"}
403 <script type="text/javascript">
404 {literal} (function($, _) { // Generic Closure
406 function showRuleFields( ruleFields ) {
407 var msg1 = '{/literal}{ts 1="' + ruleFields + '"}Primary participants will be able to register additional participants using the same email address. The configured "Supervised" Dedupe Rule will use the following fields to prevent duplicate registrations: %1. First and Last Name will be used to check for matches among multiple participants.{/ts}{literal}';
408 var msg2 = '{/literal}{ts escape='js'}Primary participants will be allowed to register for this event multiple times. No duplicate registration checking will be performed.{/ts}{literal}';
409 var msg3 = '{/literal}{ts escape='js'}Primary participants will be able to register additional participants during registration.{/ts}{literal}';
412 $('.ui-notify-message .ui-notify-close').click();
413 if ( $("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
414 CRM.alert( msg1, '', 'info', {expires:0} );
415 } else if ( $("#allow_same_participant_emails").prop('checked' ) && !cj("#is_multiple_registrations").prop('checked' ) ) {
416 CRM.alert( msg2, '', 'info', {expires:0} );
417 } else if ( !$("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
418 CRM.alert( msg3, '', 'info', {expires:0} );
422 var profileBottomCount = Number({/literal}{$profilePostMultiple|@count}{literal});
423 var profileBottomCountAdd = Number({/literal}{$profilePostMultipleAdd|@count}{literal});
425 function addBottomProfile( e ) {
428 var addtlPartc = $(this).data('addtlPartc');
431 profileBottomCount++;
432 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottomAdd: 1, addProfileNumAdd: profileBottomCountAdd, snippet: 4 } ) ;
434 profileBottomCountAdd++;
435 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottom: 1 , addProfileNum : profileBottomCount, snippet: 4 } ) ;
438 $(this).closest('tbody').append('<tr class="additional_profile"></tr>');
439 var $el = $(this).closest('tbody').find('tr:last');
440 $el.load(urlPath, function() { $(this).trigger('crmLoad') });
443 function removeBottomProfile( e ) {
446 $(e.target).parents('tr').find('.crm-profile-selector').val('');
447 $(e.target).parents('tr').hide();
450 var strSameAs = ' - '+ts('same as for main contact')+' - ';
451 var strSelect = ' - '+ts('select')+' - ';
453 $('#crm-container').on('crmLoad', function() {
454 var $container = $("[id^='additional_profile_'],.additional_profile").not('.processed').addClass('processed');
455 $container.find(".crm-profile-selector-select select").each( function() {
456 var $select = $(this);
457 var selected = $select.find(':selected').val(); //cache the default
458 $select.find('option[value=""]').remove();
459 $select.prepend('<option value="">'+strSameAs+'</option>');
460 if ($select.closest('tr').is(':not([id*="_pre"])')) {
461 $select.prepend('<option value="">'+strSelect+'</option>');
463 $select.find('option[value="'+selected+'"]').attr('selected', 'selected'); //restore default
469 showRuleFields( {/literal}{$ruleFields}{literal} );
471 var allow_multiple = $("#is_multiple_registrations");
472 if ( !allow_multiple.prop('checked') ) {
473 $('#additional_profile_pre,#additional_profile_post').hide();
475 allow_multiple.change( function( ) {
476 if ( !$(this).prop('checked') ) {
477 $("#additional_custom_pre_id,#additional_custom_post_id").val('');
478 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").hide();
479 $('#additional_profile_pre,#additional_profile_post').hide();
481 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").show();
482 $('#additional_profile_pre,#additional_profile_post').show();
485 showRuleFields({/literal}{$ruleFields}{literal});
488 $('#allow_same_participant_emails').change( function() { showRuleFields({/literal}{$ruleFields}{literal}) });
490 $('#registration_blocks').on('click', '.crm-button-add-profile', addBottomProfile);
491 $('#registration_blocks').on('click', '.crm-button-rem-profile', removeBottomProfile);
493 $('#crm-container').on('crmLoad', function(e) {
494 $('tr[id^="additional_profile"] input[id^="additional_custom_"]').change(function(e) {
495 $input = $(e.target);
496 if ( $input.val() == '') {
497 $selected = $input.closest('tr').find('.crm-profile-selector-select :selected');
498 if ($selected.text() == strSelect) { $input.val('none'); }
504 }(CRM.$, CRM._)); //Generic Closure