Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
232624b1 | 3 | | CiviCRM version 4.4 | |
6a488035 TO |
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 | {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} | |
b7054e52 | 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> |
6a488035 TO |
32 | <br/> |
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> | |
35 | </td> | |
36 | </tr> | |
37 | {/if} | |
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} | |
b7054e52 | 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> |
6a488035 TO |
43 | <br/> |
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> | |
46 | </td> | |
47 | </tr> | |
48 | {/if} | |
49 | {else} | |
50 | {assign var=eventID value=$id} | |
51 | <div id="help"> | |
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"} | |
54 | </div> | |
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"} | |
58 | </div> | |
59 | ||
60 | <div id="register"> | |
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} | |
7230099a | 65 | <span class="description">{ts}Online registration enabled?{/ts}</span> |
6a488035 TO |
66 | </td> |
67 | </tr> | |
68 | </table> | |
69 | </div> | |
70 | <div class="spacer"></div> | |
71 | <div id="registration_blocks"> | |
72 | <table class="form-layout-compressed"> | |
73 | ||
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> | |
77 | </tr> | |
78 | {if !$isTemplate} | |
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> | |
82 | </tr> | |
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> | |
86 | </tr> | |
87 | {/if} | |
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> | |
91 | </tr> | |
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> | |
95 | </tr> | |
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> | |
100 | {/if} | |
101 | </tr> | |
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> | |
106 | {/if} | |
107 | </tr> | |
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> | |
111 | </tr> | |
112 | </table> | |
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> | |
123 | </td> | |
124 | </tr> | |
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> | |
129 | </tr> | |
130 | </table> | |
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> | |
137 | </td> | |
138 | </tr> | |
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} | |
b7054e52 | 142 | <span class='profile_bottom_link_main {if $profilePostMultiple}hiddenElement{/if}'> <a href="#" onclick="addProfileBottom(); return false;">{ts}add profile{/ts}</a></span> |
6a488035 TO |
143 | <br /> |
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> | |
146 | </td> | |
147 | </tr> | |
148 | ||
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} | |
b7054e52 | 154 | <span class='profile_bottom_link_remove'><a href="#" onclick="removeProfile('{$profilePostNum}'); return false;">{ts}remove profile{/ts}</a></span> |
6a488035 | 155 | {if $smarty.foreach.profilePostIdName.last} |
b7054e52 | 156 | <span class='profile_bottom_link'><a href="#" onclick="addProfileBottom(); return false;">{ts}add profile{/ts}</a></span> |
6a488035 TO |
157 | {/if} |
158 | <br/><span class="profile-links"></span> | |
159 | </td> | |
160 | </tr> | |
161 | {/foreach} | |
162 | {/if} | |
163 | </table> | |
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> | |
170 | </td> | |
171 | </tr> | |
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} | |
b7054e52 | 175 | <span class='profile_bottom_add_link_main {if $profilePostMultipleAdd}hiddenElement{/if}'><a href="#" onclick="addProfileBottomAdd(); return false;">{ts}add profile{/ts}</a></span> |
6a488035 TO |
176 | <br /> |
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> | |
179 | </td> | |
180 | </tr> | |
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} | |
b7054e52 | 186 | <span class='profile_bottom_add_link_remove'><a href="#" onclick="removeProfileAdd('{$profilePostNumA}'); return false;">{ts}remove profile{/ts}</a></span> |
6a488035 | 187 | {if $smarty.foreach.profilePostIdAName.last} |
b7054e52 | 188 | <span class='profile_bottom_add_link'><a href="#" onclick="addProfileBottomAdd(); return false;">{ts}add profile{/ts}</a></span> |
6a488035 TO |
189 | {/if} |
190 | <br/><span class="profile-links"></span> | |
191 | </td> | |
192 | </tr> | |
193 | {/foreach} | |
194 | {/if} | |
195 | <tr class='crm-event-manage-registration-form-block-create-new-profile'> | |
196 | <td class="label"></td> | |
47ecc69e | 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> |
6a488035 TO |
198 | </tr> |
199 | </table> | |
200 | </div> | |
201 | </fieldset> | |
202 | ||
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> | |
211 | </td> | |
212 | </tr> | |
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> | |
217 | </td> | |
218 | </tr> | |
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> | |
223 | </td> | |
224 | </tr> | |
225 | </table> | |
226 | </fieldset> | |
227 | ||
228 | {*ThankYou Block*} | |
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> | |
236 | </td> | |
237 | </tr> | |
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> | |
242 | </td> | |
243 | </tr> | |
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> | |
248 | </td> | |
249 | </tr> | |
250 | </table> | |
251 | </fieldset> | |
252 | ||
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> | |
256 | <div> | |
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> | |
262 | </td> | |
263 | </tr> | |
264 | </table> | |
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> | |
271 | </td> | |
272 | </tr> | |
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> | |
277 | </td> | |
278 | </tr> | |
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> | |
283 | </td> | |
284 | </tr> | |
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> | |
289 | </td> | |
290 | </tr> | |
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> | |
295 | </td> | |
296 | </tr> | |
297 | </table> | |
298 | </div> | |
299 | </div> | |
300 | </fieldset> | |
301 | </div> {*end of div registration_blocks*} | |
302 | </div> | |
303 | <div class="crm-submit-buttons"> | |
304 | {include file="CRM/common/formButtons.tpl" location="bottom"} | |
305 | </div> | |
306 | ||
307 | {include file="CRM/common/showHide.tpl"} | |
308 | {include file="CRM/common/showHideByFieldValue.tpl" | |
309 | trigger_field_id ="is_online_registration" | |
310 | trigger_value ="" | |
311 | target_element_id ="registration_blocks" | |
312 | target_element_type ="block" | |
313 | field_type ="radio" | |
314 | invert = 0 | |
315 | } | |
316 | {include file="CRM/common/showHideByFieldValue.tpl" | |
317 | trigger_field_id ="is_email_confirm" | |
318 | trigger_value ="" | |
319 | target_element_id ="confirmEmail" | |
320 | target_element_type ="block" | |
321 | field_type ="radio" | |
322 | invert = 0 | |
323 | } | |
324 | {include file="CRM/common/showHideByFieldValue.tpl" | |
325 | trigger_field_id ="is_multiple_registrations" | |
326 | trigger_value ="" | |
327 | target_element_id ="additional_profile_pre|additional_profile_post" | |
328 | target_element_type ="table-row" | |
329 | field_type ="radio" | |
330 | invert = 0 | |
331 | } | |
332 | {if $form.requires_approval} | |
333 | {include file="CRM/common/showHideByFieldValue.tpl" | |
334 | trigger_field_id ="requires_approval" | |
335 | trigger_value ="" | |
336 | target_element_id ="id-approval-text" | |
337 | target_element_type ="table-row" | |
338 | field_type ="radio" | |
339 | invert = 0 | |
340 | } | |
341 | {/if} | |
342 | ||
343 | {*include profile link function*} | |
344 | {include file="CRM/common/buildProfileLink.tpl"} | |
345 | ||
346 | <script type="text/javascript"> | |
347 | {literal} | |
348 | cj("#is_multiple_registrations").change( function( ) { | |
8539f25d | 349 | if ( !cj(this).prop('checked') ) { |
6a488035 TO |
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(); | |
353 | } else { | |
354 | cj(".crm-event-manage-registration-form-block-additional_custom_post_multiple").show(); | |
355 | } | |
356 | }); | |
357 | ||
358 | showRuleFields( {/literal}{$ruleFields}{literal} ); | |
359 | ||
360 | function showRuleFields( ruleFields ) | |
361 | { | |
f845ba96 | 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}'; |
6a488035 TO |
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}'; | |
365 | ||
366 | // Display info | |
a615afcc | 367 | cj('.ui-notify-message .ui-notify-close').click(); |
8539f25d | 368 | if ( cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) { |
a615afcc | 369 | CRM.alert( msg1, '', 'info', {expires:0} ); |
8539f25d | 370 | } else if ( cj("#allow_same_participant_emails").prop('checked' ) && !cj("#is_multiple_registrations").prop('checked' ) ) { |
a615afcc | 371 | CRM.alert( msg2, '', 'info', {expires:0} ); |
8539f25d | 372 | } else if ( !cj("#allow_same_participant_emails").prop('checked' ) && cj("#is_multiple_registrations").prop('checked' ) ) { |
a615afcc | 373 | CRM.alert( msg3, '', 'info', {expires:0} ); |
6a488035 TO |
374 | } |
375 | } | |
376 | ||
377 | var profileBottomCount = Number({/literal}{$profilePostMultiple|@count}{literal}); | |
378 | ||
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, | |
386 | async : false, | |
387 | global : false, | |
388 | success : function ( content ) { | |
389 | cj( "#profile_post" ).parent().append( content ); | |
390 | } | |
391 | }); | |
392 | } | |
393 | ||
394 | ||
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, | |
403 | async : false, | |
404 | global : false, | |
405 | success : function ( contentAdd ) { | |
406 | cj( "#additional_profile_post" ).parent().append( contentAdd ); | |
407 | } | |
408 | }); | |
409 | } | |
410 | ||
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( ); | |
416 | } | |
417 | } | |
418 | ||
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( ); | |
424 | } | |
425 | } | |
426 | ||
427 | //show edit profile field links | |
428 | cj(function() { | |
429 | // show edit for main profile | |
b967a2db | 430 | cj(document).on('change', 'select[id^="custom_p"]', function( event ) { |
6a488035 TO |
431 | buildLinks( cj(this), cj(this).val()); |
432 | }); | |
433 | ||
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()); | |
437 | }); | |
438 | ||
439 | //show edit profile field links in additional participant | |
b967a2db | 440 | cj(document).on('change', 'select[id^="additional_custom_p"]', function( event ) { |
6a488035 TO |
441 | buildLinks( cj(this), cj(this).val()); |
442 | }); | |
443 | ||
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()); | |
447 | }); | |
448 | }); | |
449 | ||
450 | {/literal} | |
451 | </script> | |
452 | {include file="CRM/common/formNavigate.tpl"} | |
453 | {/if} |