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-dedupe_rule_group_id">
95 <td scope="row" class="label" width="20%">{$form.dedupe_rule_group_id.label}</td>
96 <td>{$form.dedupe_rule_group_id.html} {help id="id-dedupe_rule_group_id"}</td>
98 <tr class="crm-event-manage-registration-form-block-requires_approval">
99 {if $form.requires_approval}
100 <td scope="row" class="label" width="20%">{$form.requires_approval.label}</td>
101 <td>{$form.requires_approval.html} {help id="id-requires_approval"}</td>
104 <tr id="id-approval-text" class="crm-event-manage-registration-form-block-approval_req_text">
105 {if $form.approval_req_text}
106 <td scope="row" class="label"
107 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>
108 <td>{$form.approval_req_text.html}</td>
111 <tr class="crm-event-manage-registration-form-block-expiration_time">
112 <td scope="row" class="label" width="20%">{$form.expiration_time.label}</td>
113 <td>{$form.expiration_time.html|crmAddClass:four} {help id="id-expiration_time"}</td>
116 <div class="spacer"></div>
118 {*Registration Block*}
119 <fieldset id="registration" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
120 <legend class="collapsible-title">{ts}Registration Screen{/ts}</legend>
121 <div id="registration_screen">
122 <table class="form-layout-compressed">
123 <tr class="crm-event-manage-registration-form-block-intro_text">
124 <td scope="row" class="label"
125 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>
126 <td>{$form.intro_text.html}
128 class="description">{ts}Introductory message / instructions for online event registration page (may include HTML formatting tags).{/ts}</div>
131 <tr class="crm-event-manage-registration-form-block-footer_text">
132 <td scope="row" class="label"
133 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>
134 <td>{$form.footer_text.html}
135 <div class="description">{ts}Optional footer text for registration screen.{/ts}</div>
139 <table class="form-layout-compressed">
140 <tr class="crm-event-manage-registration-form-block-custom_pre_id">
141 <td scope="row" class="label" width="20%">{$form.custom_pre_id.label}</td>
142 <td>{$form.custom_pre_id.html}<br/>
144 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/>
147 <tr id="profile_post" class="crm-event-manage-registration-form-block-custom_post_id">
148 <td scope="row" class="label" width="20%">{$form.custom_post_id.label}</td>
149 <td>{$form.custom_post_id.html}
150 <span class='profile_bottom_link_main {if $profilePostMultiple}hiddenElement{/if}'> <a href="#"
151 class="crm-hover-button crm-button-add-profile"><span
152 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
155 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>
159 {if $profilePostMultiple}
160 {foreach from=$profilePostMultiple item=profilePostId key=profilePostNum name=profilePostIdName}
161 <tr id="custom_post_id_multiple_{$profilePostNum}_wrapper"
162 class='crm-event-manage-registration-form-block-custom_post_multiple'>
163 <td scope="row" class="label" width="20%">{$form.custom_post_id_multiple.$profilePostNum.label}</td>
164 <td>{$form.custom_post_id_multiple.$profilePostNum.html}
165 <span class='profile_bottom_link_remove'><a href="#"
166 class="crm-hover-button crm-button-rem-profile"><span
167 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
168 {if $smarty.foreach.profilePostIdName.last}
170 <span class='profile_bottom_link'><a href="#" class="crm-hover-button crm-button-add-profile"><span
171 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
173 <br/><span class="profile-links"></span>
179 <table class="form-layout-compressed">
180 <tr id="additional_profile_pre" class="crm-event-manage-registration-form-block-additional_custom_pre_id">
181 <td scope="row" class="label" width="20%">{$form.additional_custom_pre_id.label}</td>
182 <td>{$form.additional_custom_pre_id.html}<br/>
184 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
185 <br/><span class="profile-links"></span>
188 <tr id="additional_profile_post" class="crm-event-manage-registration-form-block-additional_custom_post_id">
189 <td scope="row" class="label" width="20%">{$form.additional_custom_post_id.label}</td>
190 <td>{$form.additional_custom_post_id.html}
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 profile{/ts}</a></span>
196 class="description">{ts}Change this if you want to use a different profile for additional participants.{/ts}</span>
197 <br/><span class="profile-links"></span>
200 {if $profilePostMultipleAdd}
201 {foreach from=$profilePostMultipleAdd item=profilePostIdA key=profilePostNumA name=profilePostIdAName}
202 <tr id='additional_custom_post_id_multiple_{$profilePostNumA}_wrapper'
203 class='crm-event-manage-registration-form-block-additional_custom_post_multiple'>
204 <td scope="row" class="label"
205 width="20%">{$form.additional_custom_post_id_multiple.$profilePostNumA.label}</td>
206 <td>{$form.additional_custom_post_id_multiple.$profilePostNumA.html}
207 <span class='profile_bottom_add_link_remove'><a href="#"
208 class="crm-hover-button crm-button-rem-profile"><span
209 class="icon ui-icon-trash"></span>{ts}remove profile{/ts}</a></span>
210 {if $smarty.foreach.profilePostIdAName.last}
212 <span class='profile_bottom_add_link'><a href="#"
213 class="crm-hover-button crm-button-add-profile"><span
214 class="icon ui-icon-plus"></span>{ts}add profile{/ts}</a></span>
216 <br/><span class="profile-links"></span>
225 {*Confirmation Block*}
226 <fieldset id="confirm" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
227 <legend class="collapsible-title">{ts}Confirmation Screen{/ts}</legend>
229 <table class="form-layout-compressed">
230 <tr class="crm-event-manage-registration-form-block-is_confirm_enabled">
231 <td scope="row" class="label" width="20%">{$form.is_confirm_enabled.label}</td>
232 <td>{$form.is_confirm_enabled.html}
233 <div class="description">{ts}Optionally hide the confirmation screen for free events.{/ts}</div>
239 <div id="confirm_screen_settings">
240 <table class="form-layout-compressed">
241 <tr class="crm-event-manage-registration-form-block-confirm_title">
242 <td scope="row" class="label" width="20%">{$form.confirm_title.label} <span
243 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_title' id=$eventID}{/if}
245 <td>{$form.confirm_title.html}<br/>
247 class="description">{ts}Page title for screen where user reviews and confirms their registration information.{/ts}</span>
250 <tr class="crm-event-manage-registration-form-block-confirm_text">
251 <td scope="row" class="label"
252 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>
253 <td>{$form.confirm_text.html}
254 <div class="description">{ts}Optional instructions / message for Confirmation screen.{/ts}</div>
257 <tr class="crm-event-manage-registration-form-block-confirm_footer_text">
258 <td scope="row" class="label"
259 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>
260 <td>{$form.confirm_footer_text.html}
261 <div class="description">{ts}Optional page footer text for Confirmation screen.{/ts}</div>
269 <fieldset id="thankyou" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
270 <legend class="collapsible-title">{ts}Thank-you Screen{/ts}</legend>
271 <table class="form-layout-compressed">
272 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_title">
273 <td scope="row" class="label" width="20%">{$form.thankyou_title.label} <span
274 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='thankyou_title' id=$eventID}{/if}
276 <td>{$form.thankyou_title.html}
277 <div class="description">{ts}Page title for registration Thank-you screen.{/ts}</div>
280 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_text">
281 <td scope="row" class="label"
282 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>
283 <td>{$form.thankyou_text.html}
285 class="description">{ts}Optional message for Thank-you screen (may include HTML formatting).{/ts}</div>
288 <tr class="crm-event-manage-registration-form-block-confirm_thankyou_footer_text">
289 <td scope="row" class="label"
290 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>
291 <td>{$form.thankyou_footer_text.html}
293 class="description">{ts}Optional footer text for Thank-you screen (often used to include links to other pages/activities on your site).{/ts}</div>
299 {* Confirmation Email Block *}
300 <fieldset id="mail" class="crm-collapsible {if $defaultsEmpty}collapsed{/if}">
301 <legend class="collapsible-title">{ts}Confirmation Email{/ts}</legend>
303 <table class="form-layout-compressed">
304 <tr class="crm-event-manage-registration-form-block-is_email_confirm">
305 <td scope="row" class="label" width="20%">{$form.is_email_confirm.label}</td>
306 <td>{$form.is_email_confirm.html}<br/>
308 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>
312 <div id="confirmEmail">
313 <table class="form-layout-compressed">
314 <tr class="crm-event-manage-registration-form-block-confirm_email_text">
315 <td scope="row" class="label"
316 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>
317 <td>{$form.confirm_email_text.html}<br/>
319 class="description">{ts}Additional message or instructions to include in confirmation email.{/ts}</span>
322 <tr class="crm-event-manage-registration-form-block-confirm_from_name">
323 <td scope="row" class="label" width="20%">{$form.confirm_from_name.label} <span
324 class="marker">*</span> {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='confirm_from_name' id=$eventID}{/if}
326 <td>{$form.confirm_from_name.html}<br/>
327 <span class="description">{ts}FROM name for email.{/ts}</span>
330 <tr class="crm-event-manage-registration-form-block-confirm_from_email">
331 <td scope="row" class="label" width="20%">{$form.confirm_from_email.label} <span class="marker">*</span></td>
332 <td>{$form.confirm_from_email.html}<br/>
334 class="description">{ts}FROM email address (this must be a valid email account with your SMTP email service provider).{/ts}</span>
337 <tr class="crm-event-manage-registration-form-block-cc_confirm">
338 <td scope="row" class="label" width="20%">{$form.cc_confirm.label}</td>
339 <td>{$form.cc_confirm.html}<br/>
341 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>
344 <tr class="crm-event-manage-registration-form-block-bcc_confirm">
345 <td scope="row" class="label" width="20%">{$form.bcc_confirm.label}</td>
346 <td>{$form.bcc_confirm.html}<br/>
348 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>
355 </div> {*end of div registration_blocks*}
357 <div class="crm-submit-buttons">
358 {include file="CRM/common/formButtons.tpl" location="bottom"}
360 {include file="CRM/common/showHide.tpl"}
361 {include file="CRM/common/showHideByFieldValue.tpl"
362 trigger_field_id ="is_online_registration"
364 target_element_id ="registration_blocks"
365 target_element_type ="block"
370 {include file="CRM/common/showHideByFieldValue.tpl"
371 trigger_field_id ="is_confirm_enabled"
373 target_element_id ="confirm_screen_settings"
374 target_element_type ="block"
379 {include file="CRM/common/showHideByFieldValue.tpl"
380 trigger_field_id ="is_email_confirm"
382 target_element_id ="confirmEmail"
383 target_element_type ="block"
387 {include file="CRM/common/showHideByFieldValue.tpl"
388 trigger_field_id ="is_multiple_registrations"
390 target_element_id ="additional_profile_pre|additional_profile_post"
391 target_element_type ="table-row"
395 {if $form.requires_approval}
396 {include file="CRM/common/showHideByFieldValue.tpl"
397 trigger_field_id ="requires_approval"
399 target_element_id ="id-approval-text"
400 target_element_type ="table-row"
406 {*include profile link function*}
407 {include file="CRM/common/buildProfileLink.tpl"}
409 <script type="text/javascript">
410 {literal} (function($, _) { // Generic Closure
412 $(".crm-submit-buttons input").click( function() {
413 $(".dedupenotify .ui-notify-close").click();
416 var profileBottomCount = Number({/literal}{$profilePostMultiple|@count}{literal});
417 var profileBottomCountAdd = Number({/literal}{$profilePostMultipleAdd|@count}{literal});
419 function addBottomProfile( e ) {
422 var addtlPartc = $(this).data('addtlPartc');
425 profileBottomCount++;
426 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottomAdd: 1, addProfileNumAdd: profileBottomCountAdd, snippet: 4 } ) ;
428 profileBottomCountAdd++;
429 urlPath = CRM.url('civicrm/event/manage/registration', { addProfileBottom: 1 , addProfileNum : profileBottomCount, snippet: 4 } ) ;
432 $(this).closest('tbody').append('<tr class="additional_profile"></tr>');
433 var $el = $(this).closest('tbody').find('tr:last');
434 $el.load(urlPath, function() { $(this).trigger('crmLoad') });
437 function removeBottomProfile( e ) {
440 $(e.target).parents('tr').find('.crm-profile-selector').val('');
441 $(e.target).parents('tr').hide();
444 var strSameAs = ' - '+ts('same as for main contact')+' - ';
445 var strSelect = ' - '+ts('select')+' - ';
447 $('#crm-container').on('crmLoad', function() {
448 var $container = $("[id^='additional_profile_'],.additional_profile").not('.processed').addClass('processed');
449 $container.find(".crm-profile-selector-select select").each( function() {
450 var $select = $(this);
451 var selected = $select.find(':selected').val(); //cache the default
452 $select.find('option[value=""]').remove();
453 $select.prepend('<option value="">'+strSameAs+'</option>');
454 if ($select.closest('tr').is(':not([id*="_pre"])')) {
455 $select.prepend('<option value="">'+strSelect+'</option>');
457 $select.find('option[value="'+selected+'"]').attr('selected', 'selected'); //restore default
463 var allow_multiple = $("#is_multiple_registrations");
464 if ( !allow_multiple.prop('checked') ) {
465 $('#additional_profile_pre,#additional_profile_post').hide();
467 allow_multiple.change( function( ) {
468 if ( !$(this).prop('checked') ) {
469 $("#additional_custom_pre_id,#additional_custom_post_id").val('');
470 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").hide();
471 $('#additional_profile_pre,#additional_profile_post').hide();
473 $(".crm-event-manage-registration-form-block-additional_custom_post_multiple").show();
474 $('#additional_profile_pre,#additional_profile_post').show();
477 showRuleFields({/literal}{$ruleFields}{literal});
480 $('#allow_same_participant_emails').change( function() { showRuleFields({/literal}{$ruleFields}{literal}) });
482 $('#registration_blocks').on('click', '.crm-button-add-profile', addBottomProfile);
483 $('#registration_blocks').on('click', '.crm-button-rem-profile', removeBottomProfile);
485 $('#crm-container').on('crmLoad', function(e) {
486 $('tr[id^="additional_profile"] input[id^="additional_custom_"]').change(function(e) {
487 $input = $(e.target);
488 if ( $input.val() == '') {
489 $selected = $input.closest('tr').find('.crm-profile-selector-select :selected');
490 if ($selected.text() == strSelect) { $input.val('none'); }
496 }(CRM.$, CRM._)); //Generic Closure