From 35a709f9f4d062bac476fec335b6844602433bb5 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Sun, 3 Jul 2022 17:05:38 +0100 Subject: [PATCH] Fix PHP notice and hide/show 'including yourself' depending on if contact_id is set --- CRM/Event/Form/Registration/Register.php | 2 +- templates/CRM/Event/Form/Registration/Register.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index 96a55b4fc3..dac1326ab8 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -368,8 +368,8 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { CRM_Core_Payment_ProcessorForm::buildQuickForm($this); $contactID = $this->getContactID(); + $this->assign('contact_id', $contactID); if ($contactID) { - $this->assign('contact_id', $contactID); $this->assign('display_name', CRM_Contact_BAO_Contact::displayName($contactID)); } diff --git a/templates/CRM/Event/Form/Registration/Register.tpl b/templates/CRM/Event/Form/Registration/Register.tpl index 615e8a765a..337110f20c 100644 --- a/templates/CRM/Event/Form/Registration/Register.tpl +++ b/templates/CRM/Event/Form/Registration/Register.tpl @@ -60,7 +60,7 @@
{$form.additional_participants.label} *
- {$form.additional_participants.html}{if $contact_id || $contact_id == NULL} {ts}(including yourself){/ts}{/if} + {$form.additional_participants.html}{if $contact_id} {ts}(including yourself){/ts}{/if}
-- 2.25.1