CRM_Contact_Form_Task_EmailCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_SMSCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Core_Session::setStatus($status, ts('Saved'), 'success');
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ $tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
+ $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
+ $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_EmailCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_PDFLetterCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_SMSCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_EmailCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contribute_Form_Task_PDFLetterCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_EmailCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
return CRM_Contact_Form_Task_PDFLetterCommon::setDefaultValues();
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
*/
public static function commonCompose(&$form) {
//get the tokens.
- $tokens = CRM_Core_SelectValues::contactTokens();
+ $tokens = array();
- $className = CRM_Utils_System::getClassName($form);
- if ($className == 'CRM_Mailing_Form_Upload') {
- $tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
- }
- elseif ($className == 'CRM_Admin_Form_ScheduleReminders') {
- $tokens = array_merge(CRM_Core_SelectValues::activityTokens(), $tokens);
- $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
- $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
- }
- elseif ($className == 'CRM_Event_Form_ManageEvent_ScheduleReminders') {
- $tokens = array_merge(CRM_Core_SelectValues::eventTokens(), $tokens);
- }
-
- //TODO standardize on this method
if (method_exists($form, 'listTokens')) {
$tokens = array_merge($form->listTokens(), $tokens);
}
$textFields = array('text_message' => ts('HTML Format'), 'sms_text_message' => ts('SMS Message'));
$modePrefixes = array('Mail' => NULL, 'SMS' => 'SMS');
+ $className = CRM_Utils_System::getClassName($form);
+
if ($className != 'CRM_SMS_Form_Upload' && $className != 'CRM_Contact_Form_Task_SMS' &&
$className != 'CRM_Contact_Form_Task_SMS'
) {
return ts('Mailing Content');
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ $tokens = array_merge(CRM_Core_SelectValues::mailingTokens(), $tokens);
+ return $tokens;
+ }
+
}
CRM_Contact_Form_Task_EmailCommon::postProcess($this);
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}
}
/**
- * List available tokens, at time of writing these were
- * {membership.id} => Membership ID
- * {membership.status} => Membership Status
- * {membership.type} => Membership Type
- * {membership.start_date} => Membership Start Date
- * {membership.join_date} => Membership Join Date
- * {membership.end_date} => Membership End Date
- * {membership.fee} => Membership Fee
+ * List available tokens for this form.
+ *
* @return array
*/
public function listTokens() {
- return CRM_Core_SelectValues::membershipTokens();
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ $tokens = array_merge(CRM_Core_SelectValues::membershipTokens(), $tokens);
+ return $tokens;
}
}
return ts('SMS Content');
}
+ /**
+ * List available tokens for this form.
+ *
+ * @return array
+ */
+ public function listTokens() {
+ $tokens = CRM_Core_SelectValues::contactTokens();
+ return $tokens;
+ }
+
}