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_multiple[$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 another profile (bottom of page){/ts}</a></span>
36 {if $addProfileBottomAdd }
38 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</div>
41 class="description">{ts}Include additional fields on this registration form by selecting and configuring a CiviCRM Profile to be included at the bottom of the page.{/ts}</div>
43 <br/><span class="profile-links"></span>
46 {assign var=eventID value=$id}
48 {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}
49 {help id="id-event-reg"}
51 <div class="crm-block crm-form-block crm-event-manage-registration-form-block">
52 <div class="crm-submit-buttons">
53 {include file="CRM/common/formButtons.tpl" location="top"}
57 <table class="form-layout">
58 <tr class="crm-event-manage-registration-form-block-is_online_registration">
59 <td class="label">{$form.is_online_registration.label}</td>
60 <td>{$form.is_online_registration.html}
61 <span class="description">{ts}Online registration enabled?{/ts}</span>
66 <div class="spacer"></div>
67 <div id="registration_blocks">
68 <table class="form-layout-compressed">
70 <tr class="crm-event-manage-registration-form-block-registration_link_text">
71 <td scope="row" class="label"
72 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>
73 <td>{$form.registration_link_text.html} {help id="id-link_text"}</td>
76 <tr class="crm-event-manage-registration-form-block-registration_start_date">
77 <td scope="row" class="label" width="20%">{$form.registration_start_date.label}</td>
78 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_start_date}</td>
80 <tr class="crm-event-manage-registration-form-block-registration_end_date">
81 <td scope="row" class="label" width="20%">{$form.registration_end_date.label}</td>
82 <td>{include file="CRM/common/jcalendar.tpl" elementName=registration_end_date}</td>
85 <tr class="crm-event-manage-registration-form-block-is_multiple_registrations">
86 <td scope="row" class="label" width="20%">{$form.is_multiple_registrations.label}</td>
87 <td>{$form.is_multiple_registrations.html} {help id="id-allow_multiple"}</td>
89 <tr class="crm-event-manage-registration-form-block-allow_same_participant_emails">
90 <td scope="row" class="label" width="20%">{$form.allow_same_participant_emails.label}</td>
91 <td>{$form.allow_same_participant_emails.html} {help id="id-allow_same_email"}</td>
93 <tr class="crm-event-manage-registration-form-block-dedupe_rule_group_id">
94 <td scope="row" class="label" width="20%">{$form.dedupe_rule_group_id.label}</td>
95 <td>{$form.dedupe_rule_group_id.html} {help id="id-dedupe_rule_group_id"}</td>
97 <tr class="crm-event-manage-registration-form-block-requires_approval">
98 {if $form.requires_approval}
99 <td scope="row" class="label" width="20%">{$form.requires_approval.label}</td>
100 <td>{$form.requires_approval.html} {help id="id-requires_approval"}</td>
103 <tr id="id-approval-text" class="crm-event-manage-registration-form-block-approval_req_text">
104 {if $form.approval_req_text}
105 <td scope="row" class="label"
106 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>
107 <td>{$form.approval_req_text.html}</td>
110 <tr class="crm-event-manage-registration-form-block-expiration_time">
111 <td scope="row" class="label" width="20%">{$form.expiration_time.label}</td>
112 <td>{$form.expiration_time.html|crmAddClass:four} {help id="id-expiration_time"}</td>
115 <div class="spacer"></div>
117 {*Registration Block*}
118 <fieldset id="registration" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
119 <legend class="collapsible-title">{ts}Registration Screen{/ts}</legend>
120 <div id="registration_screen">
121 <table class="form-layout-compressed">
122 <tr class="crm-event-manage-registration-form-block-intro_text">
123 <td scope="row" class="label"
124 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>
125 <td>{$form.intro_text.html}
127 class="description">{ts}Introductory message / instructions for online event registration page (may include HTML formatting tags).{/ts}</div>
130 <tr class="crm-event-manage-registration-form-block-footer_text">
131 <td scope="row" class="label"
132 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>
133 <td>{$form.footer_text.html}
134 <div class="description">{ts}Optional footer text for registration screen.{/ts}</div>
138 <table class="form-layout-compressed">
139 <tr class="crm-event-manage-registration-form-block-custom_pre_id">
140 <td scope="row" class="label" width="20%">{$form.custom_pre_id.label}</td>
141 <td>{$form.custom_pre_id.html}
143 class="description">{ts}Include additional fields on this registration form by selecting and configuring a CiviCRM Profile to be included at the top of the page (immediately after the introductory message).{/ts}{help id="event-profile"}</div>
146 <tr id="profile_post" class="crm-event-manage-registration-form-block-custom_post_id">
147 <td scope="row" class="label" width="20%">{$form.custom_post_id.label}</td>
148 <td>{$form.custom_post_id.html}
150 class="description">{ts}Include additional fields on this registration form by selecting and configuring a CiviCRM Profile to be included at the bottom of the page.{/ts}</div>
151 <span class='profile_bottom_link_main {if $profilePostMultiple}hiddenElement{/if}'> <a href="#"
152 class="crm-hover-button crm-button-add-profile"><span
153 class="icon ui-icon-plus"></span>{ts}add another profile (bottom of page){/ts}</a></span>
158 {if $profilePostMultiple}
159 {foreach from=$profilePostMultiple item=profilePostId key=profilePostNum name=profilePostIdName}
160 <tr id="custom_post_id_multiple_{$profilePostNum}_wrapper"
161 class='crm-event-manage-registration-form-block-custom_post_multiple'>
162 <td scope="row" class="label" width="20%">{$form.custom_post_id_multiple.$profilePostNum.label}</td>
163 <td>{$form.custom_post_id_multiple.$profilePostNum.html}
164 <span class='profile_bottom_link_remove'><a href="#"
165 class="crm-hover-button crm-button-rem-profile"><span
166 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
168 <span class='profile_bottom_link' {if !$smarty.foreach.profilePostIdName.last}style="display: none"{/if}><a href="#" class="crm-hover-button crm-button-add-profile"><span
169 class="icon ui-icon-plus"></span>{ts}add another profile (bottom of page){/ts}</a></span>
170 <br/><span class="profile-links"></span>
176 <table class="form-layout-compressed">
177 <tr id="additional_profile_pre" class="crm-event-manage-registration-form-block-additional_custom_pre_id">
178 <td scope="row" class="label" width="20%">{$form.additional_custom_pre_id.label}</td>
179 <td>{$form.additional_custom_pre_id.html}
181 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</div>
182 <br/><span class="profile-links"></span>
185 <tr id="additional_profile_post" class="crm-event-manage-registration-form-block-additional_custom_post_id">
186 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id.label}</td>
187 <td>{$form.additional_custom_post_id.html}
189 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}
191 <span class='profile_bottom_add_link_main{if $profilePostMultipleAdd} hiddenElement{/if}'><a
192 href="#" class="crm-hover-button crm-button-add-profile"><span
193 class="icon ui-icon-plus"></span>{ts}add another profile (bottom of page){/ts}</a></span>
194 <br/><span class="profile-links"></span>
197 {if $profilePostMultipleAdd}
198 {foreach from=$profilePostMultipleAdd item=profilePostIdA key=profilePostNumA name=profilePostIdAName}
199 <tr id='additional_custom_post_id_multiple_{$profilePostNumA}_wrapper'
200 class='crm-event-manage-registration-form-block-additional_custom_post_multiple'>
201 <td scope="row" class="label"
202 width="20%">{$form.additional_custom_post_id_multiple.$profilePostNumA.label}</td>
203 <td>{$form.additional_custom_post_id_multiple.$profilePostNumA.html}
204 <span class='profile_bottom_add_link_remove'><a href="#"
205 class="crm-hover-button crm-button-rem-profile"><span
206 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
207 {if $smarty.foreach.profilePostIdAName.last}
209 <span class='profile_bottom_add_link'><a href="#"
210 class="crm-hover-button crm-button-add-profile"><span
211 class="icon ui-icon-plus"></span>{ts}add another profile (bottom of page){/ts}</a></span>
213 <br/><span class="profile-links"></span>
222 {*Confirmation Block*}
223 <fieldset id="confirm" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
224 <legend class="collapsible-title">{ts}Confirmation Screen{/ts}</legend>
226 <table class="form-layout-compressed">
227 <tr class="crm-event-manage-registration-form-block-is_confirm_enabled">
228 <td scope="row" class="label" width="20%">{$form.is_confirm_enabled.label}</td>
229 <td>{$form.is_confirm_enabled.html}
230 <div class="description">{ts}Optionally hide the confirmation screen for free events.{/ts}</div>
236 <div id="confirm_screen_settings">
237 <table class="form-layout-compressed">
238 <tr class="crm-event-manage-registration-form-block-confirm_title">
239 <td scope="row" class="label" width="20%">{$form.confirm_title.label} <span
240 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_title' id=$eventID}{/if}
242 <td>{$form.confirm_title.html}<br/>
244 class="description">{ts}Page title for screen where user reviews and confirms their registration information.{/ts}</span>
247 <tr class="crm-event-manage-registration-form-block-confirm_text">
248 <td scope="row" class="label"
249 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>
250 <td>{$form.confirm_text.html}
251 <div class="description">{ts}Optional instructions / message for Confirmation screen.{/ts}</div>
254 <tr class="crm-event-manage-registration-form-block-confirm_footer_text">
255 <td scope="row" class="label"
256 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>
257 <td>{$form.confirm_footer_text.html}
258 <div class="description">{ts}Optional page footer text for Confirmation screen.{/ts}</div>
266 <fieldset id="thankyou" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
267 <legend class="collapsible-title">{ts}Thank-you Screen{/ts}</legend>
268 <table class="form-layout-compressed">
269 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_title">
270 <td scope="row" class="label" width="20%">{$form.thankyou_title.label} <span
271 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_title' id=$eventID}{/if}
273 <td>{$form.thankyou_title.html}
274 <div class="description">{ts}Page title for registration Thank-you screen.{/ts}</div>
277 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_text">
278 <td scope="row" class="label"
279 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>
280 <td>{$form.thankyou_text.html}
282 class="description">{ts}Optional message for Thank-you screen (may include HTML formatting).{/ts}</div>
285 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_footer_text">
286 <td scope="row" class="label"
287 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>
288 <td>{$form.thankyou_footer_text.html}
290 class="description">{ts}Optional footer text for Thank-you screen (often used to include links to other pages/activities on your site).{/ts}</div>
296 {* Confirmation Email Block *}
297 <fieldset id="mail" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
298 <legend class="collapsible-title">{ts}Confirmation Email{/ts}</legend>
300 <table class="form-layout-compressed">
301 <tr class="crm-event-manage-registration-form-block-is_email_confirm">
302 <td scope="row" class="label" width="20%">{$form.is_email_confirm.label}</td>
303 <td>{$form.is_email_confirm.html}<br/>
305 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>
309 <div id="confirmEmail">
310 <table class="form-layout-compressed">
311 <tr class="crm-event-manage-registration-form-block-confirm_email_text">
312 <td scope="row" class="label"
313 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>
314 <td>{$form.confirm_email_text.html}<br/>
316 class="description">{ts}Additional message or instructions to include in confirmation email.{/ts}</span>
319 <tr class="crm-event-manage-registration-form-block-confirm_from_name">
320 <td scope="row" class="label" width="20%">{$form.confirm_from_name.label} <span
321 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_from_name' id=$eventID}{/if}
323 <td>{$form.confirm_from_name.html}<br/>
324 <span class="description">{ts}FROM name for email.{/ts}</span>
327 <tr class="crm-event-manage-registration-form-block-confirm_from_email">
328 <td scope="row" class="label" width="20%">{$form.confirm_from_email.label} <span class="marker">*</span></td>
329 <td>{$form.confirm_from_email.html}<br/>
331 class="description">{ts}FROM email address (this must be a valid email account with your SMTP email service provider).{/ts}</span>
334 <tr class="crm-event-manage-registration-form-block-cc_confirm">
335 <td scope="row" class="label" width="20%">{$form.cc_confirm.label}</td>
336 <td>{$form.cc_confirm.html}<br/>
338 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>
341 <tr class="crm-event-manage-registration-form-block-bcc_confirm">
342 <td scope="row" class="label" width="20%">{$form.bcc_confirm.label}</td>
343 <td>{$form.bcc_confirm.html}<br/>
345 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>
352 </div> {*end of div registration_blocks*}
354 <div class="crm-submit-buttons">
355 {include file="CRM/common/formButtons.tpl" location="bottom"}
357 {include file="CRM/common/showHide.tpl"}
358 {include file="CRM/common/showHideByFieldValue.tpl"
359 trigger_field_id ="is_online_registration"
361 target_element_id ="registration_blocks"
362 target_element_type ="block"
367 {include file="CRM/common/showHideByFieldValue.tpl"
368 trigger_field_id ="is_confirm_enabled"
370 target_element_id ="confirm_screen_settings"
371 target_element_type ="block"
376 {include file="CRM/common/showHideByFieldValue.tpl"
377 trigger_field_id ="is_email_confirm"
379 target_element_id ="confirmEmail"
380 target_element_type ="block"
384 {include file="CRM/common/showHideByFieldValue.tpl"
385 trigger_field_id ="is_multiple_registrations"
387 target_element_id ="additional_profile_pre|additional_profile_post"
388 target_element_type ="table-row"
392 {if $form.requires_approval}
393 {include file="CRM/common/showHideByFieldValue.tpl"
394 trigger_field_id ="requires_approval"
396 target_element_id ="id-approval-text"
397 target_element_type ="table-row"
403 {*include profile link function*}
404 {include file="CRM/common/buildProfileLink.tpl"}
406 <script type="text/javascript">
407 {literal} (function($, _) { // Generic Closure
409 $(".crm-submit-buttons input").click( function() {
410 $(".dedupenotify .ui-notify-close").click();
413 var profileBottomCount = Number({/literal}{$profilePostMultiple|@count}{literal});
414 var profileBottomCountAdd = Number({/literal}{$profilePostMultipleAdd|@count}{literal});
416 function addBottomProfile( e ) {
419 var addtlPartc = $(this).data('addtlPartc');
421 if ($(this).closest("td").children("input").attr("name").indexOf("additional_custom_post") > -1 || addtlPartc) {
422 profileBottomCountAdd++
423 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottomAdd: 1, addProfileNumAdd: profileBottomCountAdd, snippet: 4 } ) ;
425 profileBottomCount++;
426 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottom: 1 , addProfileNum : profileBottomCount, snippet: 4 } ) ;
429 $(this).closest('tbody').append('<tr class="additional_profile"></tr>');
430 var $el = $(this).closest('tbody').find('tr:last');
431 $el.load(urlPath, function() { $(this).trigger('crmLoad') });
432 $(this).closest(".profile_bottom_link_main, .profile_bottom_link, .profile_bottom_add_link_main").hide();
433 $el.find(".profile_bottom_link_main, .profile_bottom_link, .profile_bottom_add_link_main").show();
436 function removeBottomProfile( e ) {
439 $(e.target).closest('tr').hide().find('.crm-profile-selector').val('');
440 $(e.target).closest('tbody').find('tr:visible:last .profile_bottom_link_main, tr:visible:last .profile_bottom_link, tr:visible:last .profile_bottom_add_link_main').show();
443 var strSameAs = ' - '+ts('same as for main contact')+' - ';
444 var strSelect = ' - '+ts('select')+' - ';
446 $('#crm-container').on('crmLoad', function() {
447 var $container = $("[id^='additional_profile_'],.additional_profile").not('.processed').addClass('processed');
448 $container.find(".crm-profile-selector-select select").each( function() {
449 var $select = $(this);
450 var selected = $select.find(':selected').val(); //cache the default
451 $select.find('option[value=""]').remove();
452 $select.prepend('<option value="">'+strSameAs+'</option>');
453 if ($select.closest('tr').is(':not([id*="_pre"])')) {
454 $select.prepend('<option value="">'+strSelect+'</option>');
456 $select.find('option[value="'+selected+'"]').attr('selected', 'selected'); //restore default
462 var allow_multiple = $("#is_multiple_registrations");
463 if ( !allow_multiple.prop('checked') ) {
464 $('#additional_profile_pre,#additional_profile_post').hide();
466 allow_multiple.change( function( ) {
467 if ( !$(this).prop('checked') ) {
468 $("#additional_custom_pre_id,#additional_custom_post_id").val('');
469 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").hide();
470 $('#additional_profile_pre,#additional_profile_post').hide();
472 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").show();
473 $('#additional_profile_pre,#additional_profile_post').show();
476 showRuleFields({/literal}{$ruleFields}{literal});
479 $('#allow_same_participant_emails').change( function() { showRuleFields({/literal}{$ruleFields}{literal}) });
481 $('#registration_blocks').on('click', '.crm-button-add-profile', addBottomProfile);
482 $('#registration_blocks').on('click', '.crm-button-rem-profile', removeBottomProfile);
484 $('#crm-container').on('crmLoad', function(e) {
485 $('tr[id^="additional_profile"] input[id^="additional_custom_"]').change(function(e) {
486 $input = $(e.target);
487 if ( $input.val() == '') {
488 $selected = $input.closest('tr').find('.crm-profile-selector-select :selected');
489 if ($selected.text() == strSelect) { $input.val('none'); }
495 }(CRM.$, CRM._)); //Generic Closure