Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Image upload field processing on volunteer signup form #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CRM/Volunteer/Form/VolunteerSignUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function setDefaultValues() {

return $defaults;
}

/**
* The "vid" URL parameter for this form was deprecated in CiviVolunteer 2.0.
*
Expand All @@ -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);
}
}
}

/**
Expand Down Expand Up @@ -350,7 +350,7 @@ function buildQuickForm() {

$this->addButtons(array(
array(
'type' => 'done',
'type' => 'upload',
'name' => ts('Submit', array('domain' => 'org.civicrm.volunteer')),
'isDefault' => TRUE,
),
Expand Down Expand Up @@ -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());
Expand Down