Skip to content

Commit

Permalink
Merge pull request #16058 from eileenmcnaughton/mem_js
Browse files Browse the repository at this point in the history
Fix js error on choosing membership type
  • Loading branch information
seamuslee001 authored Dec 9, 2019
2 parents adb7ef1 + 38f6574 commit 134fdbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
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

0 comments on commit 134fdbb

Please sign in to comment.