| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
static $greetings = array();
/**
- * Build the form object elements for Communication Preferences object
+ * Build the form object elements for Communication Preferences object.
*
* @param CRM_Core_Form $form
* Reference to the form object.
// since the pcm - preferred comminication method is logically
// grouped hence we'll use groups of HTML_QuickForm
-
// checkboxes for DO NOT phone, email, mail
// we take labels from SelectValues
$privacy = $commPreff = $commPreference = array();
if (!empty($greetingTokens)) {
$form->addElement('select', $fields['field'], $fields['label'],
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $greetingTokens
);
//custom addressee
}
/**
- * Global form rule
+ * Global form rule.
*
* @param array $fields
* The input form values.
if ($form->_action & CRM_Core_Action::ADD) {
foreach (CRM_Contact_BAO_Contact::$_greetingTypes as $greeting) {
if (empty($defaults[$greeting . '_id'])) {
- if ($defaultGreetingTypeId =
- CRM_Contact_BAO_Contact_Utils::defaultGreeting($form->_contactType, $greeting)
+ if ($defaultGreetingTypeId = CRM_Contact_BAO_Contact_Utils::defaultGreeting($form->_contactType, $greeting)
) {
$defaults[$greeting . '_id'] = $defaultGreetingTypeId;
}
}
/**
- * set array of greeting fields
+ * set array of greeting fields.
*
* @param $contactType
*
return self::$greetings[$contactType];
}
+
}