| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | Copyright CiviCRM LLC. All rights reserved. | |
| 4 | | | |
| 5 | | This work is published under the GNU AGPLv3 license with some | |
| 6 | | permitted exceptions and without any warranty. For full license | |
| 7 | | and copyright information, see https://civicrm.org/licensing | |
| 8 | +--------------------------------------------------------------------+ |
| 9 | *} |
| 10 | {* Step 1 of New Event Wizard, and Edit Event Info form. *} |
| 11 | |
| 12 | <div class="crm-block crm-form-block crm-event-manage-eventinfo-form-block"> |
| 13 | {assign var=eventID value=$id} |
| 14 | <div class="crm-submit-buttons"> |
| 15 | {include file="CRM/common/formButtons.tpl" location="top"} |
| 16 | </div> |
| 17 | <table class="form-layout-compressed"> |
| 18 | {if !empty($form.template_id)} |
| 19 | <tr class="crm-event-manage-eventinfo-form-block-template_id"> |
| 20 | <td class="label">{$form.template_id.label} {help id="id-select-template" isTemplate=$isTemplate}</td> |
| 21 | <td>{$form.template_id.html}</td> |
| 22 | </tr> |
| 23 | {/if} |
| 24 | {if !empty($form.template_title)} |
| 25 | <tr class="crm-event-manage-eventinfo-form-block-template_title"> |
| 26 | <td class="label">{$form.template_title.label} {help id="id-template-title"}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='template_title' id=$eventID}{/if}</td> |
| 27 | <td>{$form.template_title.html}</td> |
| 28 | </tr> |
| 29 | {/if} |
| 30 | <tr class="crm-event-manage-eventinfo-form-block-event_type_id"> |
| 31 | <td class="label">{$form.event_type_id.label}</td> |
| 32 | <td>{$form.event_type_id.html}</td> |
| 33 | </tr> |
| 34 | |
| 35 | {* CRM-7362 --add campaign *} |
| 36 | {include file="CRM/Campaign/Form/addCampaignToComponent.tpl" |
| 37 | campaignTrClass="crm-event-manage-eventinfo-form-block-campaign_id"} |
| 38 | |
| 39 | <tr class="crm-event-manage-eventinfo-form-block-default_role_id"> |
| 40 | <td class="label">{$form.default_role_id.label} {help id="id-participant-role"}</td> |
| 41 | <td>{$form.default_role_id.html} |
| 42 | </td> |
| 43 | </tr> |
| 44 | <tr class="crm-event-manage-eventinfo-form-block-participant_listing_id"> |
| 45 | <td class="label">{$form.participant_listing_id.label} {help id="id-listing" isTemplate=$isTemplate action=$action entityId=$entityId}</td> |
| 46 | <td>{$form.participant_listing_id.html}</td> |
| 47 | </tr> |
| 48 | <tr class="crm-event-manage-eventinfo-form-block-title"> |
| 49 | <td class="label">{$form.title.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='title' id=$eventID}{/if}</td> |
| 50 | <td>{$form.title.html}<br /> |
| 51 | <span class="description"> {ts}Please use only alphanumeric, spaces, hyphens and dashes for event names.{/ts} |
| 52 | </span></td> |
| 53 | </tr> |
| 54 | <tr class="crm-event-manage-eventinfo-form-block-summary"> |
| 55 | <td class="label">{$form.summary.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='summary' id=$eventID}{/if}</td> |
| 56 | <td>{$form.summary.html}</td> |
| 57 | </tr> |
| 58 | <tr class="crm-event-manage-eventinfo-form-block-description"> |
| 59 | <td class="label">{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='description' id=$eventID}{/if}</td> |
| 60 | <td>{$form.description.html}</td> |
| 61 | </tr> |
| 62 | {if !$isTemplate} |
| 63 | <tr class="crm-event-manage-eventinfo-form-block-start_date"> |
| 64 | <td class="label">{$form.start_date.label}</td> |
| 65 | <td>{$form.start_date.html}</td> |
| 66 | </tr> |
| 67 | <tr class="crm-event-manage-eventinfo-form-block-end_date"> |
| 68 | <td class="label">{$form.end_date.label}</td> |
| 69 | <td>{$form.end_date.html}</td> |
| 70 | </tr> |
| 71 | {/if} |
| 72 | <tr class="crm-event-manage-eventinfo-form-block-max_participants"> |
| 73 | <td class="label">{$form.max_participants.label} {help id="id-max_participants" waitlist=$waitlist}</td> |
| 74 | <td> |
| 75 | {$form.max_participants.html|crmAddClass:four} |
| 76 | {if call_user_func(array('CRM_Core_Permission','check'), 'administer CiviCRM') } |
| 77 | <a class="crm-popup crm-hover-button" target="_blank" title="{ts}Edit Participant Status Options{/ts}" href="{crmURL p='civicrm/admin/participant_status' q='reset=1'}"><i class="crm-i fa-wrench" aria-hidden="true"></i></a> |
| 78 | {/if} |
| 79 | </td> |
| 80 | </tr> |
| 81 | <tr id="id-waitlist" class="crm-event-manage-eventinfo-form-block-has_waitlist"> |
| 82 | {if $waitlist} |
| 83 | <td class="label">{$form.has_waitlist.label}</td> |
| 84 | <td>{$form.has_waitlist.html} {help id="id-has_waitlist"}</td> |
| 85 | {/if} |
| 86 | </tr> |
| 87 | <tr id="id-event_full" class="crm-event-manage-eventinfo-form-block-event_full_text"> |
| 88 | <td class="label">{$form.event_full_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='event_full_text' id=$eventID}{/if} |
| 89 | <br />{help id="id-event_full_text"} </td> |
| 90 | <td>{$form.event_full_text.html}</td> |
| 91 | </tr> |
| 92 | <tr id="id-waitlist-text" class="crm-event-manage-eventinfo-form-block-waitlist_text"> |
| 93 | {if !empty($form.waitlist_text)} |
| 94 | <td class="label">{$form.waitlist_text.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_event' field='waitlist_text' id=$eventID}{/if}<br />{help id="id-help-waitlist_text"}</td> |
| 95 | <td>{$form.waitlist_text.html}</td> |
| 96 | {/if} |
| 97 | </tr> |
| 98 | <tr class="crm-event-manage-eventinfo-form-block-is_map"> |
| 99 | <td> </td> |
| 100 | <td>{$form.is_map.html} {$form.is_map.label} {help id="id-is_map"}</td> |
| 101 | </tr> |
| 102 | <tr class="crm-event-manage-eventinfo-form-block-is_public"> |
| 103 | <td> </td> |
| 104 | <td>{$form.is_public.html} {$form.is_public.label} {help id="id-is_public"}</td> |
| 105 | </tr> |
| 106 | <tr class="crm-event-manage-eventinfo-form-block-is_share"> |
| 107 | <td> </td> |
| 108 | <td>{$form.is_share.html} {$form.is_share.label} {help id="id-is_share"} |
| 109 | </tr> |
| 110 | <tr class="crm-event-manage-eventinfo-form-block-is_active"> |
| 111 | <td> </td> |
| 112 | <td>{$form.is_active.html} {$form.is_active.label}</td> |
| 113 | </tr> |
| 114 | |
| 115 | {if $eventID} |
| 116 | <tr class="crm-event-manage-eventinfo-form-block-info_link"> |
| 117 | <td> </td> |
| 118 | <td class="description"> |
| 119 | {if $config->userSystem->is_drupal || $config->userFramework EQ 'WordPress'} |
| 120 | {ts}When this Event is active, create links to the Event Information page by copying and pasting the following URL:{/ts}<br /> |
| 121 | <strong>{crmURL a=1 fe=1 p='civicrm/event/info' q="reset=1&id=`$eventID`"}</strong> |
| 122 | {elseif $config->userFramework EQ 'Joomla'} |
| 123 | {ts 1=$eventID}When this Event is active, create front-end links to the Event Information page using the Menu Manager. Select <strong>Event Info Page</strong> and enter <strong>%1</strong> for the Event ID.{/ts} |
| 124 | {/if} |
| 125 | </td> |
| 126 | </tr> |
| 127 | {/if} |
| 128 | <tr> |
| 129 | <td> </td> |
| 130 | <td> </td> |
| 131 | </tr> |
| 132 | </table> |
| 133 | {include file="CRM/common/customDataBlock.tpl"} |
| 134 | <div class="crm-submit-buttons"> |
| 135 | {include file="CRM/common/formButtons.tpl" location="bottom"} |
| 136 | </div> |
| 137 | {include file="CRM/common/showHide.tpl" elemType="table-row"} |
| 138 | |
| 139 | {include file="CRM/Form/validate.tpl"} |
| 140 | </div> |
| 141 | {literal} |
| 142 | <script type="text/javascript"> |
| 143 | CRM.$(function($) { |
| 144 | var $form = $('form.{/literal}{$form.formClass}{literal}'); |
| 145 | $('#template_id', $form).change(function() { |
| 146 | $(this).closest('.crm-ajax-container, #crm-main-content-wrapper') |
| 147 | .crmSnippet({url: CRM.url('civicrm/event/add', {action: 'add', reset: 1, template_id: $(this).val(), is_template: $("input[name='is_template']").val()})}) |
| 148 | .crmSnippet('refresh'); |
| 149 | }) |
| 150 | }); |
| 151 | </script> |
| 152 | {/literal} |