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 {if $addProfileBottomAdd}
28 <tr class="crm-event-manage-registration-form-block-additional_custom_post_{$profileBottomNumAdd}">
29 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id_multiple[$profileBottomNumAdd].label}</td>
30 <td>{$form.additional_custom_post_id_multiple[$profileBottomNumAdd].html}
31 <span class='profile_bottom_add_link_remove'><a href="#" onclick="removeProfileAdd('{$profileBottomNum}'); return false;">{ts}remove profile{/ts}</a></span> <span class='profile_bottom_add_link'> <a href="#" onclick="addProfileBottomAdd(); return false;">{ts}add profile{/ts}</a></span>
33 <span class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
34 <br/><span class="profile-links"></span>
38 {if $addProfileBottom}
39 <tr class="crm-event-manage-registration-form-block-custom_post_{$profileBottomNum}">
40 <td scope="row" class="label" width="20%">{$form.custom_post_id_multiple[$profileBottomNum].label}</td>
41 <td>{$form.custom_post_id_multiple[$profileBottomNum].html}
42 <span class='profile_bottom_link_remove'><a href="#" onclick="removeProfile('{$profileBottomNum}'); return false;">{ts}remove profile{/ts}</a></span> <span class='profile_bottom_link'><a href="#" onclick="addProfileBottom(); return false;">{ts}add profile{/ts}</a></span>
44 <span 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>
45 <br/><span class="profile-links"></span>
50 {assign var=eventID value=$id}
52 {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}
53 {help id="id-event-reg"}
55 <div class="crm-block crm-form-block crm-event-manage-registration-form-block">
56 <div class="crm-submit-buttons">
57 {include file="CRM/common/formButtons.tpl" location="top"}
61 <table class="form-layout">
62 <tr class="crm-event-manage-registration-form-block-is_online_registration">
63 <td class="label">{$form.is_online_registration.label}</td>
64 <td>{$form.is_online_registration.html}
65 <span class="description">{ts}Online registration enabled?{/ts}</span>
70 <div class="spacer"></div>
71 <div id="registration_blocks">
72 <table class="form-layout-compressed">
74 <tr class="crm-event-manage-registration-form-block-registration_link_text">
75 <td scope="row" class="label" 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>
76 <td>{$form.registration_link_text.html} {help id="id-link_text"}</td>
79 <tr class="crm-event-manage-registration-form-block-registration_start_date">
80 <td scope="row" class="label" width="20%">{$form.registration_start_date.label}</td>
81 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_start_date}</td>
83 <tr class="crm-event-manage-registration-form-block-registration_end_date">
84 <td scope="row" class="label" width="20%">{$form.registration_end_date.label}</td>
85 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_end_date}</td>
88 <tr class="crm-event-manage-registration-form-block-is_multiple_registrations">
89 <td scope="row" class="label" width="20%">{$form.is_multiple_registrations.label}</td>
90 <td>{$form.is_multiple_registrations.html} {help id="id-allow_multiple"}</td>
92 <tr class="crm-event-manage-registration-form-block-allow_same_participant_emails">
93 <td scope="row" class="label" width="20%">{$form.allow_same_participant_emails.label}</td>
94 <td>{$form.allow_same_participant_emails.html} {help id="id-allow_same_email"}</td>
96 <tr class="crm-event-manage-registration-form-block-requires_approval">
97 {if $form.requires_approval}
98 <td scope="row" class="label" width="20%">{$form.requires_approval.label}</td>
99 <td>{$form.requires_approval.html} {help id="id-requires_approval"}</td>
102 <tr id="id-approval-text" class="crm-event-manage-registration-form-block-approval_req_text">
103 {if $form.approval_req_text}
104 <td scope="row" class="label" 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>
105 <td>{$form.approval_req_text.html}</td>
108 <tr class="crm-event-manage-registration-form-block-expiration_time">
109 <td scope="row" class="label" width="20%">{$form.expiration_time.label}</td>
110 <td>{$form.expiration_time.html|crmAddClass:four} {help id="id-expiration_time"}</td>
113 <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" 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>
121 <td>{$form.intro_text.html}
122 <div class="description">{ts}Introductory message / instructions for online event registration page (may include HTML formatting tags).{/ts}</div>
125 <tr class="crm-event-manage-registration-form-block-footer_text">
126 <td scope="row" class="label" 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>
127 <td>{$form.footer_text.html}
128 <div class="description">{ts}Optional footer text for registration screen.{/ts}</div></td>
131 <table class= "form-layout-compressed">
132 <tr class="crm-event-manage-registration-form-block-custom_pre_id">
133 <td scope="row" class="label" width="20%">{$form.custom_pre_id.label}</td>
134 <td>{$form.custom_pre_id.html}<br />
135 <span 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/>
136 <span class="profile-links"></span>
139 <tr id="profile_post" class="crm-event-manage-registration-form-block-custom_post_id">
140 <td scope="row" class="label" width="20%">{$form.custom_post_id.label}</td>
141 <td>{$form.custom_post_id.html}
142 <span class='profile_bottom_link_main {if $profilePostMultiple}hiddenElement{/if}'> <a href="#" onclick="addProfileBottom(); return false;">{ts}add profile{/ts}</a></span>
144 <span 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>
145 <br/><span class="profile-links"></span>
149 {if $profilePostMultiple}
150 {foreach from=$profilePostMultiple item=profilePostId key=profilePostNum name=profilePostIdName}
151 <tr id="custom_post_id_multiple_{$profilePostNum}_wrapper" class='crm-event-manage-registration-form-block-custom_post_multiple'>
152 <td scope="row" class="label" width="20%">{$form.custom_post_id_multiple.$profilePostNum.label}</td>
153 <td>{$form.custom_post_id_multiple.$profilePostNum.html}
154 <span class='profile_bottom_link_remove'><a href="#" onclick="removeProfile('{$profilePostNum}'); return false;">{ts}remove profile{/ts}</a></span>
155 {if $smarty.foreach.profilePostIdName.last}
156 <span class='profile_bottom_link'><a href="#" onclick="addProfileBottom(); return false;">{ts}add profile{/ts}</a></span>
158 <br/><span class="profile-links"></span>
164 <table class= "form-layout-compressed">
165 <tr id="additional_profile_pre" class="crm-event-manage-registration-form-block-additional_custom_pre_id">
166 <td scope="row" class="label" width="20%">{$form.additional_custom_pre_id.label}</td>
167 <td>{$form.additional_custom_pre_id.html}<br />
168 <span class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
169 <br/><span class="profile-links"></span>
172 <tr id="additional_profile_post" class="crm-event-manage-registration-form-block-additional_custom_post_id">
173 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id.label}</td>
174 <td>{$form.additional_custom_post_id.html}
175 <span class='profile_bottom_add_link_main {if $profilePostMultipleAdd}hiddenElement{/if}'><a href="#" onclick="addProfileBottomAdd(); return false;">{ts}add profile{/ts}</a></span>
177 <span class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
178 <br/><span class="profile-links"></span>
181 {if $profilePostMultipleAdd}
182 {foreach from=$profilePostMultipleAdd item=profilePostIdA key=profilePostNumA name=profilePostIdAName}
183 <tr id='additional_custom_post_id_multiple_{$profilePostNumA}_wrapper' class='crm-event-manage-registration-form-block-additional_custom_post_multiple'>
184 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id_multiple.$profilePostNumA.label}</td>
185 <td>{$form.additional_custom_post_id_multiple.$profilePostNumA.html}
186 <span class='profile_bottom_add_link_remove'><a href="#" onclick="removeProfileAdd('{$profilePostNumA}'); return false;">{ts}remove profile{/ts}</a></span>
187 {if $smarty.foreach.profilePostIdAName.last}
188 <span class='profile_bottom_add_link'><a href="#" onclick="addProfileBottomAdd(); return false;">{ts}add profile{/ts}</a></span>
190 <br/><span class="profile-links"></span>
195 <tr class='crm-event-manage-registration-form-block-create-new-profile'>
196 <td class="label"></td>
197 <td><a href="{crmURL p='civicrm/admin/uf/group/add' q='reset=1&action=add'}" target="_blank">{ts}Click here to create a new profile{/ts}</a></td>
203 {*Confirmation Block*}
204 <fieldset id="confirm" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
205 <legend class="collapsible-title">{ts}Confirmation Screen{/ts}</legend>
206 <table class= "form-layout-compressed">
207 <tr class="crm-event-manage-registration-form-block-confirm_title">
208 <td scope="row" class="label" width="20%">{$form.confirm_title.label} <span class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_title' id=$eventID}{/if}</td>
209 <td>{$form.confirm_title.html}<br />
210 <span class="description">{ts}Page title for screen where user reviews and confirms their registration information.{/ts}</span>
213 <tr class="crm-event-manage-registration-form-block-confirm_text">
214 <td scope="row" class="label" 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>
215 <td>{$form.confirm_text.html}
216 <div class="description">{ts}Optional instructions / message for Confirmation screen.{/ts}</div>
219 <tr class="crm-event-manage-registration-form-block-confirm_footer_text">
220 <td scope="row" class="label" 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>
221 <td>{$form.confirm_footer_text.html}
222 <div class="description">{ts}Optional page footer text for Confirmation screen.{/ts}</div>
229 <fieldset id="thankyou" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
230 <legend class="collapsible-title">{ts}Thank-you Screen{/ts}</legend>
231 <table class= "form-layout-compressed">
232 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_title">
233 <td scope="row" class="label" width="20%">{$form.thankyou_title.label} <span class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_title' id=$eventID}{/if}</td>
234 <td>{$form.thankyou_title.html}
235 <div class="description">{ts}Page title for registration Thank-you screen.{/ts}</div>
238 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_text">
239 <td scope="row" class="label" 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>
240 <td>{$form.thankyou_text.html}
241 <div class="description">{ts}Optional message for Thank-you screen (may include HTML formatting).{/ts}</div>
244 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_footer_text">
245 <td scope="row" class="label" 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>
246 <td>{$form.thankyou_footer_text.html}
247 <div class="description">{ts}Optional footer text for Thank-you screen (often used to include links to other pages/activities on your site).{/ts}</div>
253 {* Confirmation Email Block *}
254 <fieldset id="mail" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
255 <legend class="collapsible-title">{ts}Confirmation Email{/ts}</legend>
257 <table class= "form-layout-compressed">
258 <tr class="crm-event-manage-registration-form-block-is_email_confirm">
259 <td scope="row" class="label" width="20%">{$form.is_email_confirm.label}</td>
260 <td>{$form.is_email_confirm.html}<br />
261 <span 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>
265 <div id="confirmEmail">
266 <table class="form-layout-compressed">
267 <tr class="crm-event-manage-registration-form-block-confirm_email_text">
268 <td scope="row" class="label" 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>
269 <td>{$form.confirm_email_text.html}<br />
270 <span class="description">{ts}Additional message or instructions to include in confirmation email.{/ts}</span>
273 <tr class="crm-event-manage-registration-form-block-confirm_from_name">
274 <td scope="row" class="label" width="20%">{$form.confirm_from_name.label} <span class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_from_name' id=$eventID}{/if}</td>
275 <td>{$form.confirm_from_name.html}<br />
276 <span class="description">{ts}FROM name for email.{/ts}</span>
279 <tr class="crm-event-manage-registration-form-block-confirm_from_email">
280 <td scope="row" class="label" width="20%">{$form.confirm_from_email.label} <span class="marker">*</span></td>
281 <td>{$form.confirm_from_email.html}<br />
282 <span class="description">{ts}FROM email address (this must be a valid email account with your SMTP email service provider).{/ts}</span>
285 <tr class="crm-event-manage-registration-form-block-cc_confirm">
286 <td scope="row" class="label" width="20%">{$form.cc_confirm.label}</td>
287 <td>{$form.cc_confirm.html}<br />
288 <span 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>
291 <tr class="crm-event-manage-registration-form-block-bcc_confirm">
292 <td scope="row" class="label" width="20%">{$form.bcc_confirm.label}</td>
293 <td>{$form.bcc_confirm.html}<br />
294 <span 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>
301 </div> {*end of div registration_blocks*}
303 <div class="crm-submit-buttons">
304 {include file="CRM/common/formButtons.tpl" location="bottom"}
307 {include file="CRM/common/showHide.tpl"}
308 {include file="CRM/common/showHideByFieldValue.tpl"
309 trigger_field_id ="is_online_registration"
311 target_element_id ="registration_blocks"
312 target_element_type ="block"
316 {include file="CRM/common/showHideByFieldValue.tpl"
317 trigger_field_id ="is_email_confirm"
319 target_element_id ="confirmEmail"
320 target_element_type ="block"
324 {include file="CRM/common/showHideByFieldValue.tpl"
325 trigger_field_id ="is_multiple_registrations"
327 target_element_id ="additional_profile_pre|additional_profile_post"
328 target_element_type ="table-row"
332 {if $form.requires_approval}
333 {include file="CRM/common/showHideByFieldValue.tpl"
334 trigger_field_id ="requires_approval"
336 target_element_id ="id-approval-text"
337 target_element_type ="table-row"
343 {*include profile link function*}
344 {include file="CRM/common/buildProfileLink.tpl"}
346 <script type="text/javascript">
348 cj("#is_multiple_registrations").change( function( ) {
349 if ( !cj(this).prop('checked') ) {
350 cj("#additional_custom_pre_id").val('');
351 cj("#additional_custom_post_id").val('');
352 cj(".crm-event-manage-registration-form-block-additional_custom_post_multiple").hide();
354 cj(".crm-event-manage-registration-form-block-additional_custom_post_multiple").show();
358 showRuleFields( {/literal}{$ruleFields}{literal} );
360 function showRuleFields( ruleFields )
362 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}';
363 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}';
364 var msg3 = '{/literal}{ts escape='js'}Primary participants will be able to register additional participants during registration.{/ts}{literal}';
367 cj('.ui-notify-message .ui-notify-close').click();
368 if ( cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
369 CRM.alert( msg1, '', 'info', {expires:0} );
370 } else if ( cj("#allow_same_participant_emails").prop('checked' ) && !cj("#is_multiple_registrations").prop('checked' ) ) {
371 CRM.alert( msg2, '', 'info', {expires:0} );
372 } else if ( !cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) {
373 CRM.alert( msg3, '', 'info', {expires:0} );
377 var profileBottomCount = Number({/literal}{$profilePostMultiple|@count}{literal});
379 function addProfileBottom( ) {
380 profileBottomCount++;
381 cj('.profile_bottom_link').remove( );
382 cj('.profile_bottom_link_main').hide( );
383 var urlPath = {/literal}"{crmURL p='civicrm/event/manage/registration' h=0 q=$addProfileParams}"{literal};
384 urlPath = urlPath + '&snippet=4&addProfileNum=' + profileBottomCount;
385 cj.ajax({ url : urlPath,
388 success : function ( content ) {
389 cj( "#profile_post" ).parent().append( content );
395 var profileBottomCountAdd = Number({/literal}{$profilePostMultipleAdd|@count}{literal});
396 function addProfileBottomAdd( ) {
397 profileBottomCountAdd++;
398 cj('.profile_bottom_add_link').remove( );
399 cj('.profile_bottom_add_link_main').hide( );
400 var urlPathAdd = {/literal}"{crmURL p='civicrm/event/manage/registration' h=0 q=$addProfileParamsAdd}"{literal};
401 urlPathAdd = urlPathAdd + '&snippet=4&addProfileNumAdd=' + profileBottomCountAdd;
402 cj.ajax({ url : urlPathAdd,
405 success : function ( contentAdd ) {
406 cj( "#additional_profile_post" ).parent().append( contentAdd );
411 function removeProfile( profileID ) {
412 cj('#custom_post_id_multiple_' + profileID).val('');
413 cj('#custom_post_id_multiple_' + profileID + '_wrapper').remove( );
414 if ( cj('.profile_bottom_link').length < 1 ) {
415 cj('.profile_bottom_link_main').show( );
419 function removeProfileAdd( profileID ) {
420 cj('#additional_custom_post_id_multiple_' + profileID).val('');
421 cj('#additional_custom_post_id_multiple_' + profileID + '_wrapper').remove( );
422 if ( cj('.profile_bottom_add_link').length < 1 ) {
423 cj('.profile_bottom_add_link_main').show( );
427 //show edit profile field links
429 // show edit for main profile
430 cj(document).on('change', 'select[id^="custom_p"]', function( event ) {
431 buildLinks( cj(this), cj(this).val());
434 // make sure we set edit links for main contact profile when form loads
435 cj('select[id^="custom_p"]').each( function(e) {
436 buildLinks( cj(this), cj(this).val());
439 //show edit profile field links in additional participant
440 cj(document).on('change', 'select[id^="additional_custom_p"]', function( event ) {
441 buildLinks( cj(this), cj(this).val());
444 // make sure we set edit links for additional profile when form loads
445 cj('select[id^="additional_custom_p"]').each( function(e) {
446 buildLinks( cj(this), cj(this).val());
452 {include file="CRM/common/formNavigate.tpl"}