From d47777588a90d87c9b289e2a486b22e4d31135d1 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 5 Sep 2019 10:52:08 +0100 Subject: [PATCH] Fixed Image upload field processing on volunteer signup form --- CRM/Volunteer/Form/VolunteerSignUp.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Volunteer/Form/VolunteerSignUp.php b/CRM/Volunteer/Form/VolunteerSignUp.php index 0e4e3e1a..5675b9cc 100644 --- a/CRM/Volunteer/Form/VolunteerSignUp.php +++ b/CRM/Volunteer/Form/VolunteerSignUp.php @@ -129,7 +129,7 @@ function setDefaultValues() { return $defaults; } - + /** * The "vid" URL parameter for this form was deprecated in CiviVolunteer 2.0. * @@ -138,13 +138,13 @@ function setDefaultValues() { */ function redirectLegacyRequests() { $vid = CRM_Utils_Request::retrieve('vid', 'Int', $this, FALSE, NULL, 'GET'); - + if($vid != NULL) { $path = "civicrm/vol/"; $fragment = "/volunteer/opportunities?project=$vid&dest=event"; $newURL = CRM_Utils_System::url($path, NULL, FALSE, $fragment, FALSE, TRUE); CRM_Utils_System::redirect($newURL); - } + } } /** @@ -350,7 +350,7 @@ function buildQuickForm() { $this->addButtons(array( array( - 'type' => 'done', + 'type' => 'upload', 'name' => ts('Submit', array('domain' => 'org.civicrm.volunteer')), 'isDefault' => TRUE, ), @@ -432,7 +432,7 @@ function validate() { */ function postProcess() { $cid = CRM_Utils_Array::value('userID', $_SESSION['CiviCRM'], NULL); - $values = $this->controller->exportValues(); + $values = $this->controller->exportValues($this->_name); $profileFields = $this->getProfileFields($this->getPrimaryVolunteerProfileIDs()); $profileFieldsByType = array_reduce($profileFields, array($this, 'reduceByType'), array());