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

Fix js error on choosing membership type #16058

Merged
merged 1 commit into from
Dec 9, 2019
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/Member/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public function buildQuickForm() {

$this->addPaymentProcessorSelect(TRUE, FALSE, TRUE);
CRM_Core_Payment_Form::buildPaymentForm($this, $this->_paymentProcessor, FALSE, TRUE, $this->getDefaultPaymentInstrumentId());
$this->assign('recurProcessor', json_encode($this->_recurPaymentProcessors));
// Build the form for auto renew. This is displayed when in credit card mode or update mode.
// The reason for showing it in update mode is not that clear.
if ($this->_mode || ($this->_action & CRM_Core_Action::UPDATE)) {
Expand All @@ -233,7 +234,6 @@ public function buildQuickForm() {
$autoRenewElement->freeze();
}

$this->assign('recurProcessor', json_encode($this->_recurPaymentProcessors));
$this->addElement('checkbox',
'auto_renew',
ts('Membership renewed automatically')
Expand Down
8 changes: 2 additions & 6 deletions templates/CRM/Member/Form/Membership.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@
{/literal}

{if $membershipMode or $action eq 2}

buildAutoRenew( null, null, '{$membershipMode}');
buildAutoRenew( null, null, '{$membershipMode}');
{/if}
{literal}
function buildAutoRenew( membershipType, processorId, mode ) {
var action = {/literal}'{$action}'{literal};
Expand Down Expand Up @@ -574,10 +574,6 @@
}
showEmailOptions();
}
{/literal}
{/if}

{literal}

var customDataType = {/literal}{$customDataType|@json_encode}{literal};

Expand Down