);
}
+ /**
+ * Member auto-renew options
+ * @static
+ */
+ public static function memberAutoRenew() {
+ return array(
+ ts('No auto-renew option'),
+ ts('Give option, but not required'),
+ ts('Auto-renew required')
+ );
+ }
+
/**
* Various pre defined event dates
* @static
$allMembershipInfo = $membershipType = array();
// auto renew options if enabled for the membership
- $options = array(ts('No auto-renew option'), ts('Give option, but not required'), ts('Auto-renew required '));
+ $options = CRM_Core_SelectValues::memberAutoRenew();
foreach( $allMemberships as $key => $values ) {
if (!empty($values['is_active'])) {
$options = array();
if (is_array($paymentProcessor) && !empty($paymentProcessor)) {
$isAuthorize = TRUE;
- $options = array(ts('No auto-renew option'), ts('Give option, but not required'), ts('Auto-renew required '));
+ $options = CRM_Core_SelectValues::memberAutoRenew();
}
$this->addRadio('auto_renew', ts('Auto-renew Option'), $options);
$details['total_amount_numeric'] = $details['total_amount'];
// fix the display of the monetary value, CRM-4038
$details['total_amount'] = CRM_Utils_Money::format($details['total_amount'], NULL, '%a');
- $options = array(ts('No auto-renew option'), ts('Give option, but not required'), ts('Auto-renew required '));
+ $options = CRM_Core_SelectValues::memberAutoRenew();
$details['auto_renew'] = CRM_Utils_Array::value('auto_renew', $options[$details]);
CRM_Utils_JSON::output($details);
}
$dao->orderBy('weight');
$dao->find();
-
while ($dao->fetch()) {
$membershipType[$dao->id] = array();
CRM_Core_DAO::storeValues($dao, $membershipType[$dao->id]);
+ $membershipType[$dao->id]['period_type'] = CRM_Utils_Array::value($dao->period_type, CRM_Core_SelectValues::periodType(), '');
+ $membershipType[$dao->id]['visibility'] = CRM_Utils_Array::value($dao->visibility, CRM_Core_SelectValues::memberVisibility(), '');
+
//adding column for relationship type label. CRM-4178.
if ($dao->relationship_type_id) {
//If membership associated with 2 or more relationship then display all relationship with comma separated
<name>auto_renew</name>
<type>boolean</type>
<default>0</default>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::memberAutoRenew</callback>
+ </pseudoconstant>
<comment>0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;</comment>
<add>3.3</add>
</field>