X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FMember%2FForm.php;h=c1003f6226940cfc1701aaa5d4d638ef2a871a39;hb=b584b608df17d49bddc1d11c5c7483ac01517ce7;hp=a8ffd62a2a9e7b6874a12098da139a3259364987;hpb=3c76945c0707947edcdf6cebd7287912977dc151;p=civicrm-core.git diff --git a/CRM/Member/Form.php b/CRM/Member/Form.php index a8ffd62a2a..c1003f6226 100644 --- a/CRM/Member/Form.php +++ b/CRM/Member/Form.php @@ -159,6 +159,7 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { $this->assign('context', $this->_context); $this->assign('membershipMode', $this->_mode); + $this->assign('newCredit', CRM_Core_Config::isEnabledBackOfficeCreditCardPayments()); $this->allMembershipTypeDetails = CRM_Member_BAO_Membership::buildMembershipTypeValues($this, [], TRUE); foreach ($this->allMembershipTypeDetails as $index => $membershipType) { if ($membershipType['auto_renew']) { @@ -237,10 +238,8 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment { $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. + $this->assign('allowAutoRenew', $this->_mode && !empty($this->_recurPaymentProcessors)); if ($this->_mode || ($this->_action & CRM_Core_Action::UPDATE)) { - if (!empty($this->_recurPaymentProcessors)) { - $this->assign('allowAutoRenew', TRUE); - } $autoRenewElement = $this->addElement('checkbox', 'auto_renew', ts('Membership renewed automatically'), NULL, ['onclick' => "showHideByValue('auto_renew','','send-receipt','table-row','radio',true); showHideNotice( );"]