From fad3a3b0cfa28a73c4b6235cc83aa7f3085d68b0 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Mon, 26 Apr 2021 22:52:43 +0100 Subject: [PATCH] viewOnly parameter is not used in buildCustom for Registration --- CRM/Event/Form/Registration.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index fea27e9eb4..95a1de0410 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -487,9 +487,8 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { * * @param int $id * @param string $name - * @param bool $viewOnly */ - public function buildCustom($id, $name, $viewOnly = FALSE) { + public function buildCustom($id, $name) { if (!$id) { return; } @@ -553,13 +552,6 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { if (is_array($fields)) { $button = substr($this->controller->getButtonName(), -4); foreach ($fields as $key => $field) { - if ($viewOnly && - isset($field['data_type']) && - $field['data_type'] == 'File' || ($viewOnly && $field['name'] == 'image_URL') - ) { - // ignore file upload fields - continue; - } //make the field optional if primary participant //have been skip the additional participant. if ($button == 'skip') { @@ -576,7 +568,7 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { } } - if ($addCaptcha && !$viewOnly) { + if ($addCaptcha) { CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($this); } } -- 2.25.1