}
$form->assign('onlinePendingContributionId', $form->get('onlinePendingContributionId'));
- $form->assign('paid', $form->_isPaidEvent);
+ $form->assign('paid', $form->_isPaidEvent ?? NULL);
$form->addElement('checkbox',
'send_receipt',
*/
protected function assignUrlPath() {
$this->assign('urlPath', 'civicrm/contact/view/participant');
+ $this->assign('urlPathVar', NULL);
if (!$this->_id && !$this->_contactId) {
$breadCrumbs = [
[
{* Main event form template *}
{else}
<div class="crm-block crm-form-block crm-participant-form-block">
- {if $newCredit AND $action EQ 1 AND $participantMode EQ null}
+ {if $action EQ 1 AND ($context EQ 'participant' OR $context EQ 'standalone') AND $newCredit AND $participantMode EQ null}
<div class="action-link css_right crm-link-credit-card-mode">
{if $contactId}
{capture assign=ccModeLink}{crmURL p='civicrm/contact/view/participant' q="reset=1&action=add&cid=`$contactId`&context=`$context`&mode=live"}{/capture}
{/if}
<div id="eventFullMsg" class="messages status no-popup" style="display:none;"></div>
-
- {if $action eq 1 AND $paid}
- <div class="help">
- {ts}If you are accepting offline payment from this participant, check <strong>Record Payment</strong>. You will be able to fill in the payment information, and optionally send a receipt.{/ts}
- </div>
- {/if}
-
{if $action eq 8} {* If action is Delete *}
<div class="crm-participant-form-block-delete messages status no-popup">
<div class="crm-content">
{else} {* If action is other than Delete *}
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout-compressed">
- <tr class="crm-participant-form-contact-id">
- <td class="label">{$form.contact_id.label}</td>
- <td>{$form.contact_id.html}</td>
- </tr>
+ {if $context EQ 'standalone' OR $context EQ 'participant' OR $action EQ 2}
+ <tr class="crm-participant-form-contact-id">
+ <td class="label">{$form.contact_id.label}</td>
+ <td>{$form.contact_id.html}</td>
+ </tr>
+ {/if}
{if $action EQ 2}
{if $additionalParticipants} {* Display others registered by this participant *}
<tr class="crm-participant-form-block-additionalParticipants">
{/if}
<tr class="crm-participant-form-block-event_id">
<td class="label">{$form.event_id.label}</td>
- <td class="view-value">
- {$form.event_id.html}
- {if $is_test}
- {ts}(test){/ts}
- {/if}
- </td>
+ <td class="view-value">{$form.event_id.html}</td>
</tr>
{* CRM-7362 --add campaign *}
</div>
{/if}
- {if $accessContribution and $action eq 2 and $rows.0.contribution_id}
+ {if $action eq 2 and $accessContribution and $rows.0.contribution_id}
{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}
{/if}
{/if}
-
-<script type="text/javascript">
- {literal}
-
- sendNotification();
- function sendNotification() {
- var notificationStatusIds = {/literal}"{$notificationStatusIds}"{literal};
- notificationStatusIds = notificationStatusIds.split(',');
- if (cj.inArray(cj('.crm-participant-form-block-status_id select#status_id option:selected').val(), notificationStatusIds) > -1) {
- cj("#notify").show();
- cj("#is_notify").prop('checked', false);
+ {if $action NEQ 8}
+ <script type="text/javascript">
+ {literal}
+
+ sendNotification();
+ function sendNotification() {
+ var notificationStatusIds = {/literal}"{$notificationStatusIds}"{literal};
+ notificationStatusIds = notificationStatusIds.split(',');
+ if (cj.inArray(cj('.crm-participant-form-block-status_id select#status_id option:selected').val(), notificationStatusIds) > -1) {
+ cj("#notify").show();
+ }
+ else {
+ cj("#notify").hide();
+ cj("#is_notify").prop('checked', false);
+ }
}
- else {
- cj("#notify").hide();
- cj("#is_notify").prop('checked', false);
- }
- }
- {/literal}
-</script>
+ {/literal}
+ </script>
+ {/if}
{/if} {* end of main event block*}