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

NFC Minor code cleanup to contribution pages #19468

Merged
merged 1 commit into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CRM/Contribute/Form/Contribution/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public function buildQuickForm() {
// If we configured price set for contribution page
// we are not allow membership signup as well as any
// other contribution amount field, CRM-5095
if (isset($this->_priceSetId) && $this->_priceSetId) {
if (!empty($this->_priceSetId)) {
$this->add('hidden', 'priceSetId', $this->_priceSetId);
// build price set form.
$this->set('priceSetId', $this->_priceSetId);
Expand Down
8 changes: 8 additions & 0 deletions CRM/Contribute/Form/ContributionBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
*/
public $paymentInstrumentID;

/**
* The contribution ID - is an option in the URL if you are making a payment against an existing contribution (an
* "invoice payment").
*
* @var int
*/
public $_ccid;

mattwire marked this conversation as resolved.
Show resolved Hide resolved
/**
* Is the price set quick config.
* @return bool
Expand Down
6 changes: 3 additions & 3 deletions CRM/Price/BAO/PriceSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,9 @@ public static function buildPriceSet(&$form) {
// Mark which field should have the auto-renew checkbox, if any. CRM-18305
if (!empty($form->_membershipTypeValues) && is_array($form->_membershipTypeValues)) {
$autoRenewMembershipTypes = [];
foreach ($form->_membershipTypeValues as $membershiptTypeValue) {
if ($membershiptTypeValue['auto_renew']) {
$autoRenewMembershipTypes[] = $membershiptTypeValue['id'];
foreach ($form->_membershipTypeValues as $membershipTypeValue) {
if ($membershipTypeValue['auto_renew']) {
$autoRenewMembershipTypes[] = $membershipTypeValue['id'];
}
}
foreach ($form->_priceSet['fields'] as $field) {
Expand Down