$this->add('text', 'fixed_period_start_day', ts('Fixed Period Start Day'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'fixed_period_start_day'));
-
- $this->add('Select', 'duration_unit', ts('Duration Unit'), array('' => '- select period -', 'day' => 'Day', 'week' => 'Week', 'month' => 'Month', 'year' => 'Year'));
+ $this->add('Select', 'duration_unit', ts('Duration Unit'), array('' => '- select period -') + CRM_Core_SelectValues::getPremiumUnits());
$this->add('text', 'duration_interval', ts('Duration'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'duration_interval'));
- $this->add('Select', 'frequency_unit', ts('Frequency Unit'), array('' => '- select period -', 'day' => 'Day', 'week' => 'Week', 'month' => 'Month', 'year' => 'Year'));
+ $this->add('Select', 'frequency_unit', ts('Frequency Unit'), array('' => '- select period -') + CRM_Core_SelectValues::getPremiumUnits());
$this->add('text', 'frequency_interval', ts('Frequency'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Product', 'frequency_interval'));
if (!$periodType) {
$periodType = array(
'' => ts('- select -'),
- 'rolling' => ts('rolling'),
- 'fixed' => ts('fixed'),
+ 'rolling' => ts('Rolling'),
+ 'fixed' => ts('Fixed'),
);
}
return $periodType;
}
return $dedupeRuleTypes;
}
+
+ /**
+ * campaign group types
+ */
+ static function getCampaignGroupTypes() {
+ static $campaignGroupTypes = NULL;
+ if (!$campaignGroupTypes) {
+ $campaignGroupTypes = array(
+ 'Include' => ts('Include'),
+ 'Exclude' => ts('Exclude'),
+ );
+ }
+ return $campaignGroupTypes;
+ }
+
+ /**
+ * subscription history method
+ */
+ static function getSubscriptionHistoryMethods() {
+ static $subscriptionHistoryMethods = NULL;
+ if (!$subscriptionHistoryMethods) {
+ $subscriptionHistoryMethods = array(
+ 'Admin' => ts('Admin'),
+ 'Email' => ts('Email'),
+ 'Web' => ts('Web'),
+ 'API' => ts('API'),
+ );
+ }
+
+ return $subscriptionHistoryMethods;
+ }
+
+ /**
+ * premium units
+ */
+ static function getPremiumUnits() {
+ static $premiumUnits = NULL;
+ if (!$premiumUnits) {
+ $premiumUnits = array(
+ 'day' => ts('Day'),
+ 'week' => ts('Week'),
+ 'month' => ts('Month'),
+ 'year' => ts('Year'),
+ );
+ }
+
+ return $premiumUnits;
+ }
}
<length>8</length>
<required>true</required>
<comment>What operation does this ACL entry control?</comment>
+ <pseudoconstant>
+ <callback>CRM_ACL_BAO_ACL::operation()</callback>
+ </pseudoconstant>
<html>
<type>Select</type>
</html>
<length>8</length>
<default>NULL</default>
<comment>Type of Group.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::getCampaignGroupTypes()</callback>
+ </pseudoconstant>
<html>
<type>Select</type>
</html>
<length>8</length>
<required>true</required>
<comment>What operation does this user have permission on?</comment>
+ <pseudoconstant>
+ <callback>CRM_ACL_BAO_ACL::operation()</callback>
+ </pseudoconstant>
<add>1.6</add>
<html>
<type>Select</type>
<headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
<comment>What is the preferred mode of sending an email.</comment>
<add>1.1</add>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::pmf()</callback>
+ </pseudoconstant>
<html>
<type>Select</type>
</html>
<title>Group Visibility Setting</title>
<default>'User and User Admin Only'</default>
<comment>In what context(s) is this field visible.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::ufVisibility(true)</callback>
+ </pseudoconstant>
<add>1.2</add>
<html>
<type>Select</type>
<length>8</length>
<title>Group Contact Status</title>
<comment>status of contact relative to membership in group</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::groupContactStatus()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>12</length>
<comment>If defined, contact_a in a relationship of this type must be a specific contact_type.</comment>
+ <pseudoconstant>
+ <callback>CRM_Contact_BAO_ContactType::getSelectElements()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>12</length>
<comment>If defined, contact_b in a relationship of this type must be a specific contact_type.</comment>
+ <pseudoconstant>
+ <callback>CRM_Contact_BAO_ContactType::getSelectElements()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<comment>How the (un)subscription was triggered</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::getSubscriptionHistoryMethods()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<comment>The state of the contact within the group</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::groupContactStatus()</callback>
+ </pseudoconstant>
<add>1.1</add>
</field>
<field>
<length>8</length>
<default>'month'</default>
<comment>Time units for recurrence of payment.</comment>
+ <pseudoconstant>
+ <optionGroupName>recur_frequency_units</optionGroupName>
+ <keyColumn>name</keyColumn>
+ </pseudoconstant>
<add>1.6</add>
<html>
<type>Select</type>
<default>'rolling'</default>
<comment>Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
(e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) </comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::periodType()</callback>
+ </pseudoconstant>
<add>1.4</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<default>'year'</default>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::getPremiumUnits()</callback>
+ </pseudoconstant>
<add>1.4</add>
<html>
<type>Select</type>
<length>8</length>
<default>'month'</default>
<comment>Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::getPremiumUnits()</callback>
+ </pseudoconstant>
<add>1.4</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<comment>Time units for reminder.</comment>
+ <pseudoconstant>
+ <optionGroupName>recur_frequency_units</optionGroupName>
+ <keyColumn>name</keyColumn>
+ </pseudoconstant>
<add>3.4</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<comment>Time units for repetition of reminder.</comment>
+ <pseudoconstant>
+ <optionGroupName>recur_frequency_units</optionGroupName>
+ <keyColumn>name</keyColumn>
+ </pseudoconstant>
<add>3.4</add>
<html>
<type>Select</type>
<type>varchar</type>
<length>8</length>
<comment>Time units till repetition of reminder.</comment>
+ <pseudoconstant>
+ <optionGroupName>recur_frequency_units</optionGroupName>
+ <keyColumn>name</keyColumn>
+ </pseudoconstant>
<add>3.4</add>
<html>
<type>Select</type>
<length>16</length>
<required>true</required>
<comment>Controls location of data storage in extended_data table.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_BAO_CustomField::dataType()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<length>32</length>
<required>true</required>
<comment>HTML types plus several built-in extended types.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_BAO_CustomField::dataToHtml()</callback>
+ </pseudoconstant>
<add>1.1</add>
</field>
<field>
<type>varchar</type>
<length>8</length>
<comment>Visual relationship between this form and its parent.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::customGroupStyle()</callback>
+ </pseudoconstant>
<add>1.1</add>
<html>
<type>Select</type>
<length>8</length>
<required>true</required>
<comment></comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::pmf()</callback>
+ </pseudoconstant>
<add>4.2</add>
<html>
<type>Select</type>