From c3aeac8a27b7d4ca1a41d96c76e89659e0f45c53 Mon Sep 17 00:00:00 2001 From: Matthew Wire Date: Mon, 26 Apr 2021 22:52:22 +0100 Subject: [PATCH] viewOnly parameter is not used in buildCustom for Signature --- CRM/Campaign/Form/Petition/Signature.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/CRM/Campaign/Form/Petition/Signature.php b/CRM/Campaign/Form/Petition/Signature.php index 1ac26d3755..52030b7c3f 100644 --- a/CRM/Campaign/Form/Petition/Signature.php +++ b/CRM/Campaign/Form/Petition/Signature.php @@ -544,9 +544,8 @@ class CRM_Campaign_Form_Petition_Signature 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) { $session = CRM_Core_Session::singleton(); $this->assign("petition", $this->petition); @@ -570,14 +569,6 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form { $addCaptcha = FALSE; 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; - } - // if state or country in the profile, create map list($prefixName, $index) = CRM_Utils_System::explode('-', $key, 2); @@ -589,7 +580,7 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form { } } - if ($addCaptcha && !$viewOnly) { + if ($addCaptcha) { CRM_Utils_ReCAPTCHA::enableCaptchaOnForm($this); } } -- 2.25.1