Skip to content

Commit

Permalink
Fix CRM-20488: remove restrictions on soft credit contact type.
Browse files Browse the repository at this point in the history
  • Loading branch information
twomice committed May 26, 2017
1 parent b5bc440 commit 6b0044c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions CRM/Contribute/Form/SoftCredit.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ public static function preProcess(&$form) {
'entity_id' => $contriDAO->contribution_page_id,
);
$profileId = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);

//check if any honree profile is enabled if yes then assign its profile type to $_honoreeProfileType
// which will be used to constraint soft-credit contact type in formRule, CRM-13981
if (!empty($profileId[0]) && !empty($profileId[2])) {
$form->_honoreeProfileType = CRM_Core_BAO_UFGroup::getContactType($profileId[0]);
}
}
}

Expand Down Expand Up @@ -242,10 +236,6 @@ public static function formRule($fields, $errors, $self) {
if (empty($fields['soft_credit_amount'][$key])) {
$errors["soft_credit_amount[$key]"] = ts('Please enter the soft credit amount.');
}
$contactType = CRM_Contact_BAO_Contact::getContactType($fields['soft_credit_contact_id'][$key]);
if ($self->_honoreeProfileType && $self->_honoreeProfileType != $contactType) {
$errors["soft_credit_contact_id[$key]"] = ts('Please choose a contact of type %1', array(1 => $self->_honoreeProfileType));
}
}
}
}
Expand Down

0 comments on commit 6b0044c

Please sign in to comment.